comp.lang.ada
 help / color / mirror / Atom feed
From: steidl@centuryinter.net
Subject: Re: Language Choice and Coding style
Date: 1996/07/03
Date: 1996-07-03T00:00:00+00:00	[thread overview]
Message-ID: <4re0la$qk6@news.ld.centuryinter.net> (raw)
In-Reply-To: nh3f3a5qwm.fsf@paralysys


In <nh3f3a5qwm.fsf@paralysys>, nasser@apldbio.com (Nasser Abbasi) writes:
>
>   From: maggior@world2u.com (Rich Maggio)
>
>   Though things like Hungarian notation are cumbersome, I think there is 
>   definitely a need for it.  
>
>I dont think there is a need for it. It makes the code harder to read
>to start with, and it does not add anything to understanding the
>algorithm itself. IMHO.

Hungarian notation seems self-contradictory to me.  Its proponents
claim that it is a part of good coding style (or at least most of them
do ;-)).  Its purpose is to make it easy to tell at a glance what a
variable's type is.  The underlying assumption, then, seems to be that
there are just too many variables for the reader of the program to keep
track of and/or the definition of the variable is too far away to be
quickly glanced at.  If either or both of these is the case, isn't it
very likely that the code is in bad need of decomposition?  (I.e.,
another part of good coding style is being ignored?)  [I suppose
another case for hungarian notation would be for global variables,
since the definition of the variable is - by definition :) - not
local.  But then that would just be another violation of generally
accepted good coding style.]  I *might* be able to see an argument
for the use of hungarian notation for functions, since most development
environments do not let you easily glance it its definition.  (But
even for functions, I would still not personally want to use hungarion
notation - I would rather buy/build a better editor which *does* let
you view the definition at a glance).  Of course, what would be really
cool is if a code editor had an option that let you turn type-info
on and off (i.e. it would space out your code a little more so that it
could display the type of every variable and function just below its
use) - since I think that would make both camps happy.  (Or you could
use Xerox PARC's "lens" idea for this.)

Can someone come up with a case where:
   1. hungarian notation is needed for variables
   2. (1) is not solved by some other common good coding style method
   3. the case is not ultra-specific (i.e. it justifies hungarian
      notation as being a general good coding style method)


-Jeff


BTW, I tend to declare things in alphabetical order for just this
reason - to keep it down to a glance instead of an O(N) search.







  reply	other threads:[~1996-07-03  0:00 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-21  0:00 Language Choice and Coding style Nasser Abbasi
1996-06-21  0:00 ` David Emery
1996-06-21  0:00 ` Jerry van Dijk
1996-06-24  0:00   ` Adam Beneschan
1996-06-21  0:00 ` Louis Tribble
1996-06-21  0:00 ` The Amorphous Mass
1996-06-23  0:00   ` mfinney
1996-06-23  0:00     ` Robert Dewar
1996-06-26  0:00       ` mfinney
1996-06-23  0:00   ` Robert Dewar
1996-06-27  0:00     ` The Amorphous Mass
1996-06-27  0:00     ` Adam Beneschan
1996-06-28  0:00       ` Peter Hermann
1996-06-28  0:00         ` Robert A Duff
1996-06-29  0:00           ` Samuel Mize
1996-06-29  0:00             ` Robert Dewar
1996-07-04  0:00               ` John McCabe
1996-07-04  0:00               ` Dan Evens
1996-07-04  0:00               ` Peter Hermann
1996-07-04  0:00                 ` Robert Dewar
1996-07-05  0:00                   ` software engineering and the notion of authorship Fergus Henderson
1996-07-08  0:00                     ` Jakob Engblom
1996-07-08  0:00                       ` John Byerly
1996-07-08  0:00                       ` Fergus Henderson
1996-07-09  0:00                         ` Richard A. O'Keefe
1996-07-09  0:00                           ` Fergus Henderson
1996-07-11  0:00                           ` Paul Eggert
1996-07-08  0:00                       ` The Amorphous Mass
1996-07-08  0:00                         ` Robert Dewar
1996-07-08  0:00                     ` Peter Hermann
1996-07-15  0:00                     ` Ralph Silverman
1996-07-15  0:00                       ` Fergus Henderson
1996-07-17  0:00                       ` Robert Dewar
1996-07-19  0:00                         ` Mike Curtis
1996-07-05  0:00                   ` Language Choice and Coding style John McCabe
1996-07-02  0:00             ` John McCabe
1996-07-02  0:00               ` Samuel Mize
1996-07-03  0:00                 ` Jeff Dege
1996-07-03  0:00                   ` Robert Dewar
1996-07-04  0:00                     ` John McCabe
1996-07-04  0:00                     ` Phil Howard
1996-07-04  0:00                       ` Peter Hermann
1996-07-03  0:00                 ` John McCabe
1996-06-28  0:00         ` John McCabe
1996-06-28  0:00         ` Robert Dewar
1996-07-02  0:00           ` John McCabe
1996-07-06  0:00       ` Laurent Guerby
1996-07-19  0:00       ` software engineering and the notion of authorship Andrew Gierth
1996-06-21  0:00 ` Language Choice and Coding style Robert Dewar
1996-06-24  0:00   ` Dr. John B. Matthews
1996-06-21  0:00 ` David Weller
1996-06-21  0:00 ` Giuliano Carlini
     [not found] ` <4qeu56$52r@news.interpath.net>
1996-06-23  0:00   ` Nasser Abbasi
1996-06-23  0:00 ` Darin Johnson
1996-06-24  0:00 ` Andreas Schoter
1996-06-24  0:00 ` Theodore E. Dennison
1996-06-24  0:00 ` John McCabe
1996-06-24  0:00   ` Adam Beneschan
1996-06-24  0:00   ` Peter Hermann
1996-07-01  0:00     ` Alan Brain
1996-07-02  0:00       ` John McCabe
1996-06-26  0:00   ` Nasser Abbasi
1996-06-26  0:00   ` Ian Ward
1996-06-24  0:00 ` Michael R. Hartwig
1996-06-29  0:00 ` Samuel Mize
1996-07-01  0:00   ` Richard A. O'Keefe
1996-07-02  0:00     ` Samuel Mize
1996-07-03  0:00       ` Robert Dewar
1996-07-08  0:00     ` ++           robin
1996-06-29  0:00 ` Rich Maggio
1996-07-02  0:00 ` Nasser Abbasi
1996-07-03  0:00   ` steidl [this message]
1996-07-05  0:00     ` Samuel Mize
1996-07-06  0:00     ` N. L. Sizemore
1996-07-08  0:00       ` steidl
     [not found] ` <JSA.96Jun26141502@organon.com>
1996-07-01  0:00   ` Russel A Hill
1996-07-01  0:00     ` Robert Dewar
1996-07-08  0:00       ` Russel A Hill
1996-07-02  0:00     ` Richard A. O'Keefe
1996-07-02  0:00   ` Jon S Anthony
1996-07-03  0:00   ` Mark Eichin
     [not found] <835824850.11044.0@assen.demon.co.uk>
1996-06-27  0:00 ` Ian Ward
1996-06-27  0:00   ` John McCabe
  -- strict thread matches above, loose matches on Subject: below --
1996-07-05  0:00 Robert C. Leif, Ph.D.
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox