Named code blockes

Douglas Alan nessus at mit.edu
Thu May 3 23:00:09 CEST 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?

> > 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
> > otherwise?

> Because of that little word "all" in the above-quoted snippet.

But that's not what the word "all" implies in the above snippet.  It
only implies that the language should facilitate programmers in doing
what they want to accomplish -- it doesn't say how that facilitation
should be accomplished.  The best means of such facilitation is very
often to delegate tasks to a library.  That's a good reason why any
high level language should have very good facilities for delegating
tasks to a library, and also why high level languages should come with
a fairly encompassing standard library.

It's also the reason that syntactic abstraction is good, because it
provides additional flexibility and power for the implementers of
libraries and consequently allows even more stuff to be moved out of
the langugae and into libraries, making the core language,
simultaneously more simple and more powerful.

> I opine that "one language able to do everything well", which has been
> used VERY often in the past as "guiding principle" for language design,
> tends to NOT work well, because it tends to breed languages that are
> too big and complicated.

No doubt because they usually try to put everything into the language
proper, rather than making the language user-extensible.  In my
opinion the road to making a general purpose language that is
well-suited for most purposes is to figure out how to allow libraries
to provide as much of the needed functionality as possible.

> > 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.

> I disagree that it's unattainable, because I consider Python, as it
> stands today, to BE well-suited for most (programming) purposes.

Then we have a fundamental disagreement of opinion, since I feel that
no language currently in existence is well-suited to the task of
writing *large* programs.  The best languages we currently have are
*passable* at best.  Most languages are terrible for this.

> > If you aim low, you are almost sure to hit low.

> And if you aim for something requiring great complexity, you are
> almost sure to reach great complexity.  "Perfection is reached, not
> when there is no longer anything to add, but when there is no longer
> anything to take away" (Antoine de Saint-Exupery)...

Yes, so add only those features that allow other features to be added,
and take away all the rest.

> > 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.

> Best of luck in this endeavour!

Thank you.  I'm sure I'll need it.

|>oug



More information about the Python-list mailing list