Re: Hungarian Notation




Not really, postfixing requires you to read the whole name
to understand it, and thus the information it provides isn't
as visually accessible

What? You have to read the whole name in whatever naming convention you use. Unless the name is sentence type length, it isn't a problem.


the prefixes are aligned which makes them stand out, and you can
instantly know what the code does without even reading it, while
with postfixing, nothing meaningful is aligned.

But no extra data at all is added in your method. I find I **can't** read just part of a word (I think I normally read several words at once, as it happens). Using suffixes adds exactly the same information, with the added bonus that they are longer and easier to understand as I don't have to learn the prefix table.


That's more an habit issue,

I agree with you that it is a habit - a bad one :-)


I personnally find postfixed typing
a whole lot more trouble to read, as it requires actual reading
of the whole code, while aligned & prefixed code can be understood
with a partial reading.

And I find the opposite, and so do most (English-speaking?) people.

The trouble with prefixes is that it is not a natural place to add that sort of information in English. You have to **learn** to read things that way, you don't have to learn to read suffixes.

Also there is the perennial problem that in any significant OO system there are far, far too many classes/types/interfaces for it to be sensible to have prefixes for all of them. If it is OK to have variables of most classes without prefixes, then it should be OK for none of them to have prefixes.


Cheers, Jim Cooper

__________________________________________

Jim Cooper    jcooper@xxxxxxxxxxxxx
Tabdee Ltd    http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi to your Palm
__________________________________________
.



Relevant Pages

  • Re: Hungarian Notation
    ... > think that learning that many abbreviations is easy? ... not advocate a different prefix for every possible control variant. ... different prefixes in my code including query and datasource components. ... > *do* find reading HN harder. ...
    (borland.public.delphi.non-technical)
  • Re: Hungarian Notation
    ... Until I learn what they are, I don't know what all your prefixes mean. ... I don't know which objects don't get them (there are more than a dozen types of controls, and how do I know you only use it for controls?). ... If you start reading Eric's or Dave's code you will have the same problems. ...
    (borland.public.delphi.non-technical)
  • Re: Hungarian Notation
    ... Jim Cooper wrote: ... uncommon situation. ... top with their application of HN to such a degree that, as you asserted earlier, you would need a lookup table to find all the prefixes. ...
    (borland.public.delphi.non-technical)
  • Re: Hungarian Notation
    ... Jim Cooper wrote: ... you had only 5 prefixes to learn? ... > You would have to find typing a real chore if saving a handful of ... I was just countering your own silly point that "it relies on memory ...
    (borland.public.delphi.non-technical)
  • Re: Hungarian Notation
    ... Jim Cooper wrote: ... > abbreviations, at some point it gets unsupportable, which is why even ... *components* from other identifiers via the use of prefixes. ... "The two most abundant elements in the universe are hydrogen and ...
    (borland.public.delphi.non-technical)