noob question

Alan Gauld ukc902591034 at btconnect.com
Mon Jun 27 03:14:07 EDT 2005


"Matt Hollingsworth" <matt at maudit.net> wrote in message
news:mailman.911.1119762374.10512.python-list at python.org...
> Very new to python, so a noob question.  When I've written
stuff in
> JavaScript or MEL in the past, I've always adopted the variable
naming
> convention of using a $ as the first character (no, I don't use
perl,

Can I ask why you did that?
Did someone tell you to or did you hit on the idea yourself?
Do you really find it useful? I mean do you often in your
Python coding find a problem with identifying your variables?

I'm curious because one of the things I like most about Python
is the fact I don't need to mess up my programs with spurious
characters like $ etc. And I never have any problem identifying
variables etc in my code. (The same is true of Object Pascal
in Delphi, my other favourite language).

The only place I've ever found Hungarian notation useful was
in C which is a weird mix of static typing and no-typing,
and there the prefix code gives a clue as to what kind of
value you might expect to find. But when I moved to C++ I
dropped the prefixes because they added no value.

In Python Hungarian notation is meaningless since variables
aren't typed anyway.

So I am curious as to why anyone would feel the need to introduce
these kinds of notational features into Python. What is the
problem that you are trying to solve?


-- 
Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld







More information about the Python-list mailing list