[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accumulator

Guy Steele - Sun Microsystems Labs wrote:
> I am puzzled.  Could you please elaborate on what you
> mean by "decreasing the regularity"?

Sure. But I won't get drawn into a debate on it because I've been
through the debate often enough on Python mailing lists.

Simply when you pick up someone else's code, how much does it look like
the Python you are used to? This is a subtle issue because obviously we
can't force everyone to use the same function names. But we can add a
large library so that people feel less need to reinvent things. And we
can make the language syntactically rich enough that they feel less
inclined to reinvent primitives (e.g. exceptions, generators, maybe
someday coroutines). Many, but, not all Python programmers think it
would be a bad thing if one day they opened up a module and saw:


They figure that if my_private_syntactic_construct was important enough
to deserve first-class syntax then it should have been added to
everybody's Python, everywhere. Otherwise it can be just a function
rather than a macro.

There are also subtle issues around the idea of "compile time" versus
runtime. Guido's philosophy is that it is easier for a programmer to
concern themselves only with one or the other, not both. So you are
given a ton of flexibility at runtime but none at all at compile time.
It gives you a simpler mental model for how the language works. So, for
instance, Python does regular exprssion parsing at runtime whereas Perl
does it at "compile time."

I wouldn't say it is absolutely the case that Python will never have
macros. Guido changes his mind sometimes. But these are the current
arguments against.

 Paul Prescod