[fpc-devel] Some compiler changes...

Bram Kuijvenhoven kuifwaremailinglists at xs4all.nl
Tue Jan 23 15:09:26 CET 2007

Marco van de Voort wrote:
>> Michael Van Canneyt wrote:
>>> But, the 'importing identifiers' from another language is a false argument;
>>> With a simple rule (prepend with _) you have this too. It can even be
>>> automated. You don't need to butcher the language for it; 
>> The _ trick is widely used indeed, but imho those underscores make code
>> slightly less readable and also less aesthetic.
> Less readable than & ? What is the exact aesthetic ranking of !@#$%^&*()_+
> then? :-)

It is ranked as ..... cartoon! :)

You are right that putting & instead of _ everywhere doesn't seem to make a big difference. On the other hand, in code with lot of .'s, the & doesn't have to be repeated (e.g. MyOject.Class.Property.Type, instead of MyObject._Class._Property._Type).

Personally though, I agree with Thorsten that the & looks prettier than the _. And actually I switched from the _PrivateFieldName convention to the FPrivateFieldName one exactly because the __ messed up.

Well, if for Chrome and/or Delphi support we need the &, then it will have to be implemented anyway. But whether one wants to use it, might simply be a matter of taste.



More information about the fpc-devel mailing list