Identifier Naming
Thomas Kuehne
thomas-dloop at kuehne.cn
Sat Mar 11 09:52:36 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mark T schrieb am 2006-03-11:
> In article <1osp8dzdh9ihy$.yoi1lhqbyw8f$.dlg at 40tude.net>, Derek Parnell says...
>>This is kinda off topic but I can't understand why coders still use
>>standard words for identifiers. I mean after all these years of experience
>>with computing languages, this is one common source of bugs and problems.
>>
>>So to make coding life easier, just stop using single normal words for
>>identifiers. Pick a naming convention that prevents this habit and the
>>chances you are going to clash with reserved words is greatly reduced. It
>>not really all that hard.
>
> I hope you don't mean "Hungarian" notation or other cryptic naming hacks. I find
> that code style impossible to read.
I just love C#:
> class NamingOnTheRocks{
> static int @if(int @while){
> return @while * @while;
> }
>
> public static int Main(string[] args){
> int @return;
> int @static = 3, @switch = 8, @break = 2, @case = 3, @true = 0;
>
> if(@if(@switch + @break) * @case != @true){
> @return = @static;
> }else{
> @return = @break / @static;
> }
>
> return @return * 2;
> }
> }
No joke - this is valid C# !
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFEExwM3w+/yD4P9tIRAkYcAJ4t0J7N8GBtEmqudyhqfPGtkKTTcQCeJ6KQ
HOQe1kloEuePxzT+D4SvKpc=
=S/gt
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-announce
mailing list