Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8393315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:45:03+00:00 2026-06-09T19:45:03+00:00

Being an Objective-C coder, I’m so used to descriptive method names such as [car

  • 0

Being an Objective-C coder, I’m so used to descriptive method names such as

[car insertFuelWithAmount:fuelAmount
                     type:fuelType
  causesCarToSelfDestruct:NO];

How would most programmers name a corresponding method in C++? I have two questions in particular:

  1. My copy of “C++ Primer”, 4th edition, mentions (p. 46) that gosh_this_is_an_impossibly_long_name_to_type is a “really bad identifier name”. This differs from the mentality in Objective-C, which encourages very descriptive names, even if they are long. Why are long ones not appreciated by C++ coders?

  2. Maybe it’s not a matter of just migrating blindly, but rather changing one’s mindset completely? If so, what changes need to be made?

Feel free to allow some further general thoughts on your own to float along, if you don’t mind. (I know this is not a forum for general and vague questions. Hence, I tried to make things a bit more specific above.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:45:05+00:00Added an answer on June 9, 2026 at 7:45 pm

    As Fernandes points out you need to find a balance of sorts. But remember that it is all about taste, though most C++ programmers go for the shorter but somewhat descriptive method names.

    Using extremely long names, for anything, is never desirable because the code will become practically unreadable. And personally I find it very disturbing to my programmer’s eye.

    The languages are different, of course, but the focus of your transition phase would be removing the extraneous names. Like with your method above. I’ve noticed Obj-C programmers use the “WithSomething” extensions here and there. One thing to change here is to get rid of those by using overloading, for instance.

    The method you described I would probably write like this:

    car.insertFuel<int>(amount, false);
    

    If assuming some amount of fuel in integer form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a little debate with a friend about Objective-C being a 3GL but
Being relatively new to programming--think Programming in Objective-C by Kochan, Chapter 15--I'm wondering if
I'm making a console-based application in Objective-C which relies on being able to clear
So I'm a coder, I do PHP, JavaScript, and Objective-C. I'm currently working on
I've got an issue with an object not being deallocated in objective-c. I'm pretty
I'm just starting Objective C after being pampered with Applescript, and I can't seem
I'm gettin' these while i analyze my code: Method returns an Objective-C object with
This is a general objective-c / iPhone question: If I have a large method,
I've recently moved back to C# from being in Objective-C land, and the async/await
Being fairly new to objective-c and developing for ios I'm trying to figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.