Hallo David, Am Tue, 22 Feb 2011 01:44:08 +0000 schrieb David Chisnall <[email protected]>:
> One thing I noticed is that a lot of the new ICU code is using variable names > that start with underscores. The C standard specifically reserves > identifiers that start with an underscore for the implementation, and any C > compiler is completely at liberty to reject them or interpret them as > something completely random without deviating from the spec, so we really > should be using them in GNUstep, and especially not for things that are not > exported as symbols. > > This includes instance variables, by the way - we use them in quite a few > places, which is very bad and something that we should avoid. If something > needs to avoid conflicts with other code, use gs_ as the prefix, not _. This happens not to be true. Or more precisely, it is at best a half truth. Completely reserved to the implementation are names beginning with two underscores, or one underscore followed by a uppercase letter. (Most importantly, that means those might be macro names.) Reserved as global identifiers (that is, not as member names, names of local variables, and so on) are identifiers beginning with one underscore. Or in other words, instance or local variables starting with an underscore are just fine, so long as the second character is a lower case letter or a digit. (Of course, there are also a boatload of more specific reserved identifiers.) Mit freundlichen Grüßen aus Münster / with kind regards - Kai Henningsen -- SPUeNTRUP Software An der Kleimannbrücke 52 D-48157 Münster, Germany Reg: Münster Nr.29047 Fon: +49 700 CALL CATS (=22552287) Fon: +49 251 322 311 0 Fax: +49 251 322 311 99 Web: http://www.cats.ms Mail: [email protected] _______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep
