Named code blockes
nessus at mit.edu
Thu May 3 01:59:33 EDT 2001
"Alex Martelli" <aleaxit at yahoo.com> writes:
> > By doing so, you lower the barier to allowing people to accomplish
> > what they want to accomplish. Isn't that what a high-level language
> > is all about?
> Not *ALL*, fortunately. One thing that some people DO want to
> accomplish, for example, is getting a savoury hot pizza delivered to
> their workplace while they're building wonderful new programs
There's no need for a *language* to handle this, since if there were
enough programmers who wanted to order pizza pragmatically, a library
module that supported this would surely be elegant enough of a
solution. In fact, in this case, it would be *much* more elegant to
have this feature in a library than in the language itself.
Language extensions should be reserved only for those things that
cannot be elegantly or efficiently done in a library. I don't think
that anyone is saying differently. Why do you imply that I have said
> True, even _IF_ one did share the desire, embraced by most (*NOT*
> all!) language designers, to have One Language To Bind Them All, one
> pragmatic issue on the way to such domination would still be that of
> fitting well into various existing niches, which in turn does
> require ability to reuse "legacy" code &c. That accounts for
> variously-usable "interoperability" features of many existing
Having one language that can do *everything* well is just one of those
unreachable ideals -- i.e., the type of ideal that you say you are
fond of. Unattainable yes, but it should act as a guiding principle.
The unattainability of the goal implies that it would be folly to
remove the Python Extension API. At least anytime in the next 100
years or so.
> This in no way impacts my assertion, of course. Python IS as great
> as it is in part *because* it never strove to be "the best language
> for EVERY purpose". "General-purpose" does not imply "best for
> every goal"...
The holy grail should not be "best for every purpose" because that is
clearly a logical impossibility. "Well-suited for most purposes"
should be the unattainable goal.
> > Well, you clearly don't prefer Python as much as me, since I'd prefer
> > to use it for everything.
> A language able to do everything well would not *BE* Python
> (although of course it might be legally _called_ Python if the
> trademark owner so decreed -- much in the "it will be called
> FORTRAN"'s joke spirit).
If you aim low, you are almost sure to hit low.
> > P.S. Btw, I never "clamored" for any changes. I merely mused on
> > what would make Python a better language. You, as much as anyone,
> > should understand the difference.
> Thanks for the implicit compliment, I guess, but I still classify
> such phrases as your "I'd like to get rid of import statements
> altogether", which prompted Remco Gerlich's excellent retort:
> Recently people want to get rid of import, change the clear semantics of the
> assignment statement, add stricter interfaces, make more private members of
> classes, do bytecode optimization...
> Seems to me people think Python is really cool, if only it weren't Python,
> but language <insert something like Java here>...
> and "Python should have procedural macros", and "it's a wart on the
> language", and so on, as "clamor" for changes -- "insistent public
> expression" -- without any of the "turn something over in the mind
> meditatively and often inconclusively" which characterises musing.
Excuse me Mr. Martelli, but that entire thread was a thread of musings
on what people might like to see in some distant future version of
Python. I was responding to someone who mused on making the importing
mechanism even more complicated. I, on the other hand, would prefer
to see it simplified. None of this, and I specifically said so, was
to be taken as a request to change Python.
> I do appreciate your repeated attempts at softening the import of
> previous statements of yours, but it seems to me that their impact
> is limited without explicit retractions.
Yes, and *other* people posted saying that I don't need to be so
defensive about pointing out that I'm not clamoring for changes but
just musing on how the language might be even better.
You just can't win.
In any case, nothing you can say will stop me from musing, both
publically and privately on how Python might be a better language.
I'm in the process of designing a variant of Python, so it is my duty
to do so.
More information about the Python-list