On May 3, 2011, at 6:03 PM, Cédric Beust ♔ wrote:

> 
> 
> 
> On Tue, May 3, 2011 at 8:50 AM, Kirk <[email protected]> wrote:
> As much as I respect the man, I still say that said, Hungarian notation is 
> wrong. The bastardization that came from his first description is also wrong.
> 
> You speak as someone who never wrote code before Java, and I know that's not 
> the case.

Yup, C/C++, Smalltalk, Basic, Pascal, Fortran and a bunch others. But, I also 
attended a University where OO was the primary methodology and Smalltalk was 
the primary teaching language way back when just about everyone else was 
working procedurally. Then they started writing procedural code in OO languages 
where as my crowd was writing OO code in procedural languages. OO-CAL (Cray 
Assembler anyone ;-))

> 
> Anyone who has written some C/C++ code (especially Windows code) knows 
> better. Hungarian Notation (even its misunderstood version, as I pointed out) 
> was quite useful back in the days where IDE's and compilers were not as 
> powerful as they are today.

Soory but I have a different view point which is; good coding style with small 
primitive functions always worked much much better IME. That said, it wasn't 
the procedural (cobal???) style that was being taught in most institutions and 
that is what has resulted in bandaid solutions such as HN and very very fugly 
code bases.
> 
> It is admittedly much less useful today but, as I pointed out again, still 
> lives in some more healthy ways. Here is another example:
> 
> String fileName = "...";
> File file = new File(fileName);
> 
> You don't realize it, but you just used Hungarian Notation. With the names 
> you just chose, you will be able to quickly read code that uses these 
> variables and immediately notice if something is wrong, such as:
> 
> if (fileName.exists()) { ... }
> 
> You don't need an IDE to tell you something is wrong here, thanks to 
> Hungarian Notation.

Ok but this isn't the standard definition of HN.. this is naming things for 
what they are and on that point, we are in deadly agreement.

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.

Reply via email to