On 3 May 2011 08:04, Kirk <[email protected]> wrote: > > On May 3, 2011, at 4:51 PM, Cédric Beust ♔ wrote: > > On Tue, May 3, 2011 at 4:16 AM, Kevin Wright <[email protected]>wrote: > >> I'm curious... Why would it matter *where* a variable comes from? So long >> as you know *what* it is you have everything necessary to use the thing. > > > Being able to tell at a glance that a variable is a field or a local is > very useful since it tells you whether that method could be static or not, > or const or not. Having different syntactic conventions for both is also > useful to avoid shadowing. > > > If you can't tell at a glance is a variable is local or a field without an > aid, your method is most likely way too large. > > Variants of the hungarian notation are just plain wrong. Variables should > reflect purpose, not type. I refer you to Uncle Bob. > > You're actually in agreement here, as Cedric rightly pointed out: "apps hungarian" is all about encoding purpose, as opposed to "systems hungarian" which encodes type, and is just plain wrong.
As for myself, I knew of the distinction but was just plain too lazy/otherwise busy to expand on it in my mail :) In most cases, the scope of a variable is simply not part of its purpose, and so I don't believe that this should be encoded in the name. > Kind regards, > Kirk > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > -- Kevin Wright gtalk / msn : [email protected] <[email protected]>mail: [email protected] vibe / skype: kev.lee.wright quora: http://www.quora.com/Kevin-Wright twitter: @thecoda "My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger" ~ Dijkstra -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
