[fpc-devel] Suggestion for change: Overly strict check

Flávio Etrusco flavio.etrusco at gmail.com
Tue Oct 3 18:26:14 CEST 2006


> > There's a reason, I always write "self.Identifier" and I also refuse to
> > revert back to the so called Hungarian notation (like AParameter). Even
> > if there is *no* parameter and/or field with that name it's always
> > clear which part is meant.
>
> This is not Hungarian notation. Hungarian is to prefix variable names
> with the (abbreviated) type.
>

Thankfully I've read recently that this is "hungarian notation done wrong" ;-)
It said the guy quoted as being the creator of the "hungarian
notation" used prefixes according to use of the variable and/or its
scope. It seems he is a smart guy and knew variable type is a compiler
thing and we shouldn't be bothered with it ;-)
But then probably one of his colleagues in MS got it totally wrong and
started using this "type prefix" thing...

At my workplace we've standardized on using three "scope prefixes": p_
for function parameter, m_ for members/fields, and g_ for global. I
have used "scope prefixes" long before this/them and I as a
somewhat-die-hard-Pascal-programmer had a hard time getting used to
the underscores, which seems to divide the identifier and makes you
code look like C, but I barely notice it now ;-) And it's very
practical for code completion :-)
Most of the our projects nowadays are written in Java, though.

Cheers,
Flávio



More information about the fpc-devel mailing list