delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/04/18/11:13:53

X-Spam-Check-By: sourceware.org
Message-ID: <1cbe225f0704160713q567ae44fg3d5cb1a9c1e0ab03@mail.gmail.com>
Date: Tue, 17 Apr 2007 00:13:31 +1000
From: "Chelton Evans" <cheltonevans AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: C++ name with leading underscore character not Compiling
In-Reply-To: <1cbe225f0704160234u24b104a5o9b459178e895a5a8@mail.gmail.com>
MIME-Version: 1.0
References: <1cbe225f0704160234u24b104a5o9b459178e895a5a8 AT mail DOT gmail DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

>And since you think this is important (and I agree), why on earth are
you trying to use >reservered names that will not benefit this
portability which you seek? :P

Pre fixing the underscore character is a technique that was around
before the language evolved.  Generally I use lowercase variables to
name the variables so I had not encountered the problem.  (and I was
coding before compilers were reliable like we know them today)
The compilers that I had used I had not encountered this before.

My main reason for using the underscore character is that unlike other
keyboard characters the underscore character is instinctively read as
a space, and hence the meaning of the variable does not change when
the programmer reads it.
ie  int _mv ... mv(_mv)

The language choose to partly give a most useful character and place
it in the compilers hands which I do object to, as it is a very useful
character for the above reason.

However after this discussion I will add the underscore character to
the end of a variable instead of the start, so thankyou everyone for
contributing and clearing things up.

I went and checked the pre-processed code and a macro substitution had ocurred.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019