[Python-ideas] syntax for set

average dreamingforward at gmail.com
Fri Nov 19 21:47:12 CET 2010

On Thu, Nov 18, 2010 at 3:50 PM, Steven D'Aprano <steve at pearwood.info>wrote:

> average wrote:
>  Truly.  But the point is that the universe will inevitably evolve towards
>> elegance.
> "Inevitably"? I think the only think we can say that the universe will
> inevitably evolve towards is a state of maximum entropy. But frankly, I
> don't see the relevance to the future heat death of the universe in hundreds
> of billions of years to Python's syntax.

Come on now :)  I was speaking of the programmer's universe.  But to the
extent the universe is logical, it will also evolve (or has evolved?)
towards elegance (that is, after all what's pushing the physicist's ideal of
a Theory of Everything!).  Which brings us to the mathematicians dilemma:
do we create the universe or do we discover it?

> To only "go on with the information it has and the users it has"

> ensures that it remains merely a branch off the trunk of the ideal
> (consequently drawing few new users), that eventually will need either to
> be
> *deliberately* pruned, or will wither and break off unexpectedly at some
> future point.  Remember, the bulk of new, loyal, users are drawn by an
> ideal
> (you might remember yourself being among them), not even necessarily by how
> big the library is.

I beg to differ... it seems to me that users are drawn to languages for many
> reasons, and while elegance can be one of them, it is fairly low down the
> list. Why else would C++, VB and PHP be so popular, while Haskell and Scheme
> remain tiny and unpopular (although very influential)?

Well, you certainly have the issue of momentum for one part of the
explanation.  Many are not willing do ditch their old toolset even when a
better one is presented.  The other is that the most elegant languages are
sometimes those understood by the fewest....

> Besides, how do you define "elegant"? I've heard it said, in full
> seriousness, that BrainF*** is the most elegant language because it is a
> fully Turing-complete language in only six commands (plus two more for IO).
I can define it quite succinctly:  Komolgorov semantic density.  Each
element of syntax of a language can be seen as a condensing down to its
Kolmolgorov ideal the tightest expression of a common programmatic need.
Completeness is a necessary but insufficient condition (so BrainFuck is out
of the question).

Personally, I see Python as an extremely elegant language, but that elegance
> is tempered by a very strong dose of practicality and realism. Gratuitously
> breaking backwards compatibility just so that there is a literal for the
> empty set is not what I call either practical or realistic.

The breaking of backwards compatibility is in no way gratuitous.  It may be
demolishing of a long-standing local-maxima, but hardly gratuitous.

Just a few ideas, nothing I'm trying to make a religious war on...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20101119/17d89178/attachment.html>

More information about the Python-ideas mailing list