Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Suggestion for new members and variables

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
drzoom Posted - Dec 14 2006 : 07:45:13 AM
Preface: I use to name variables often like the type is called. A local variable of the type "SlotFactory" I call "slotFactory", a member variable get the name "m_slotFactory" or "_slotFactory".

Topic: There should be a suggestion for a new variable name based on the type on the left.

Your objections:
  • There are a lot of different naming schemes, not every developer prefers to do that. (I think: it's only a suggestion, take it or ignore it.)

Bonus features to implement:
  • An addition suggestion for the people which believing in type prefixes (e.g. Foo* pFoo;).

  • The selected naming scheme is stored and the preferred name is displayed as first suggestion.


1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 14 2006 : 09:31:01 AM
I do something similar, so I see the appeal. The immediate problem is what to do with things like:

CVeryLongNameForAComplexClassThatDoesSomethingStrange m_foo1;
std::vector<int, std::pair<std::string, CBar> > m_foo2;

Next up for String's I tend to use "m_strName" since I don't want to be using "string" all of the time.

For this to work I have a mental vision of a table, two columns, lots of rows, where each row is the class type and then the name to put into the member variable name.

I am starting to think that an IDE macro is the best solution here. The basic concept would be to take the word before the caret, run a switch statement on it, and then generate a standard name "snippet" as a result.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000