Go Back   ZeroC Forums > Comments

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-26-2003
Ivan Ivan is offline
Registered User
 
 
Join Date: Feb 2003
Location: Helsinki, Finland
Posts: 15
Not serious question

Not very serious question to ZeroC staff.

Why did you change naming convention for member variables?

In Orbacus you used underscore as a postfix for member variables, like "mutex_" and now in Ice you use it as a prefix "_mutex".

Just wondering, any reason?

Personally, I prefer first way.

Ivan
Reply With Quote
  #2 (permalink)  
Old 02-26-2003
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,772
We took a vote

What's interesting with coding convention is that you prefer what you are used to. I prefered the foo_ style, too. But now I prefer the _foo style, and don't understand how we could ever use the ugly foo_ style
Reply With Quote
  #3 (permalink)  
Old 02-26-2003
marlowa marlowa is offline
Registered User
 
 
Join Date: Feb 2003
Location: London
Posts: 64
Quote:
Originally posted by marc
We took a vote :D

What's interesting with coding convention is that you prefer what you are used to. I prefered the foo_ style, too. But now I prefer the _foo style, and don't understand how we could ever use the ugly foo_ style :cool:
People prefer what they are used to. And they can get used to anything. However I think that historically a trailing underscore has been preferred because of section 17.4.3.1.2 of the std which says "each name that begins with an underscore is reserved to the implementation for use as a name in the global namespace". I realise that this only applies to global names and therefore does not apply to the names of private data members but in the past I used to quote this section of the std as a way of saying 'beware of using a leading underscore in identifiers'.

I think this explains why people are not used to it and why it makes some (including me) uneasy. Some corporate coding stds prohibit it because of the influence of section 17.4.3.1.2.


-apm
__________________
You are in a maze of twisty little passages, all different.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 04:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.