[Tutor] non-typed variables AND naming conventions

Sean 'Shaleh' Perry shaleh@valinux.com
Mon, 04 Dec 2000 15:50:32 -0800 (PST)


> I am tempted to revert to a naming convention that identifies variable types
> (as it is easier for me to read) but am hesitant believing that I'll soon
> enjoy the new found flexibility.  Any wisdom on the subject?

I just name the variable for what I am using it for:

Namestring = 'Sean Perry' # or just Name =

salary = 4.5

I find that a clear variable name tells me what it is used for, the type is not
important.

the gain I see most often in non typing is that

a) i can change my mind, if I start off using a float and move to a class, most
code need not change

b) faster, I do not have to prototype or declare types

most of my work has not needed a variable to be loosely typed, it is just a
flexibility gain.