Long names are doom ?
Gareth McCaughan
Gareth.McCaughan at pobox.com
Sat May 26 15:50:53 EDT 2001
"Rainy" wrote:
> What's the big problem with implementing this:
>
> my variable = 2
>
> my result = my variable * 3
>
> def my function(some variable):
> return some variable / 8
>
> ?
>
> I know there is something seriously wrong with this, because otherwise
> it'd be done already in some language (and afaik it isn't). So what
> exactly is wrong?
It has been dpne. Algol 68 (maybe other versions of Algol too;
I don't know) permits variable names with spaces. As Alex said,
old FORTRAN systems just ignored whitespace, but that's not quite
the same.
I think I would find things like
the result = first argument and unused bitmask
if number in interesting numbers:
hard to read (the "and" on the first line, and the "in"
on the second, are keywords). Maybe in languages with
fewer keywords it might be different, but I doubt it.
There are almost bound to be keywords you'll want to
use as elements in names (some things that are keywords
in many languages: "for", "and", "if", "do", "class").
If the usual way of combining words to make names is
sticking spaces in between, then using those words
will be painful. In more "normal" languages we combine
words like_this, likeThis, like-this, like.this or
however, and then you don't get the inconsistency
and dislocation when you need to call a function
"do list loop if not in class". :-)
--
Gareth McCaughan Gareth.McCaughan at pobox.com
.sig under construc
More information about the Python-list
mailing list