Do I always have to write "self." ?

Juergen A. Erhard jae at ilk.de
Mon May 1 15:40:16 EDT 2000


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Samuel" == Samuel A Falvo <kc5tja at garnet.armored.net> writes:

    >> OK, let's bite :-)

Yummy ;-)

    >> int WriteData(void *buffer, char *str, int len)
    >> 
    >> I fail to see how this is somehow hard to read :-)

    Samuel> It's not, in this context.  But it was a decidedly simple
    Samuel> example.  How about this:

    Samuel> 	int Evaluate( char *str1, char *param1, char *param2 );

    Samuel> Note the `param1' and `param2' argument names.  Hate to
    Samuel> tell you this, but that's Hungarian notation -- you're
    Samuel> identifying those arguments as "parameters".

So, when I give a parameter a descriptive name it's using Hungarian
notation?  So I've been using this all these years?
*Aaaaarrrggghhh*... ;-)

    Samuel> But what the heck would str1 represent?  The command that
    Samuel> acts on those parameters?  You don't know -- you CAN'T
    Samuel> know from this definition.  It's cases like this that I
    Samuel> choose to use hungarian notation:

    Samuel> 	uint32 Evaluate( char *cmd, char *param1, char *param2 );

That's a good example of what's wrong with all this "encode add'l info
in a parameter name":

This still doesn't tell you one iota of what "param1" and "param2" are
doing...

Better use *descriptive* param names (and *document* the fn) than
trying to use a crutch like Hungarion notation or anything like it.

(That's why I like ObjC... it *forces* you (more or less) to use nice
method names... like [comboBox insertItemWithObjectValue:object
atIndex:index] (and Emacs' dynamic abbrevs are my friends ;-))

Bye, J

- -- 
Jürgen A. Erhard      eMail: jae at ilk.de      phone: (GERMANY) 0721 27326
     MARS: http://members.tripod.com/Juergen_Erhard/mars_index.html
                    "Ever wonder why the SAME PEOPLE
      make up ALL the conspiracy theories?" -- Michael K. Johnson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: Use Mailcrypt and GnuPG <http://www.gnupg.org/>

iEYEARECAAYFAjkN3Z0ACgkQN0B+CS56qs1H4wCdGlHsoW3QgZmQh1DkPgPo5ThX
I2EAnR1ZaWw1Qy2f0juXDFaD3VifOXDf
=6d6b
-----END PGP SIGNATURE-----




More information about the Python-list mailing list