Scope: Simple and explicit better than nested?

rturpin at my-deja.com rturpin at my-deja.com
Thu Feb 8 11:17:53 EST 2001


In article <slrn9830t1.ueq.scarblac at pino.selwerd.nl>,
  scarblac at pino.selwerd.nl wrote:
> Having to use builtin.range, builtin.int, builtin.open,
> builtin.repr, etc etc completely kills the ease of use
> of Python. ..

Not at all. There is MUCH more to Python that makes it an
easy and great language than a few dozen builtin functions.
And if typing a few more characters makes it easier for
people corrupted by Pascal to understand what's going on,
well ..

> And it breaks all existing code.

OK, so we leave the local and builtin namespaces, and get
rid only of the global namespace. That breaks code only
for people who use the "from" statement, and we get rid
of that, too. Module names are always explicitly scoped,
as they should be anyway. This should still be simple
enough for Pascal programmers to understand. I bet I can
have a patch tomorrow that eliminates the "from" statement.

Despite that, I suspect we are doomed to nested scope.
For some reason, people prefer the complexity they learned
at their mother's knees to true simplicity. Python seems
destined to inherit the sins of the languages we left
behind. Feh.

Russell



Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list