What's better about Ruby than Python?
adalke at mindspring.com
Wed Aug 20 23:53:41 CEST 2003
> explicitly that you are using Macros. Why is that such a *huge*
> issue? Why is it that the very *existence* of a Macro in a program
> would offend your sensibilities?
Since you reject the reasons both Alex and I give against macros,
it's kinda hard to come up with another one which you will accept.
> I tend to disagree on this point. I like the idea of being able to
> treat commonly reused idioms as if they are a part of the language.
A basic idea of Python is that Python is not enough for everything.
I need to write some extensions for Python in C.
If you accept that Python is not a language unto itself, then you
open yourself to the idea that if you want a new idiom you could
add it to your implementation of Python. If you really, really think
that list.sort() should return the sorted list, then it's an easy change
to the C code. If you want a if-the-else expression, then you can
get the patch for just that from sourceforge and apply it to your
C, then, is CPython's macro language.
Why not take that approach? If your idiom is that commonly
used, won't be be worth your while?
> I don't think the natural state of human
> beings is singular in purpose or design. I think the natural state of
> humans is to fracture into competing camps / factions. *Every* human
> system of any size has factions of some sort or another. I think the
> power of Unix / Linux in general has been in working to allow these
> factions to Co-exists peacefully. By trying to prevent factioning
> within the community, I think you will ultimately only be successful
> in driving people with different viewpoints out of the community.
The 'natural' size of those groups is a tribe, with about 30-50 people.
Humans lived that way for a long, long time. As I understand it, the
hunter/gatherer cultures were pretty violent. If you aren't a relative
you're the enemy.
That changed, and we developed ways to live together, though we
are no longer free to kill people who diss us. Restrictions have proved
But computers are different in some respect. There is great freedom,
because there are few negative consequences. (Negative for life or
death, that is.) People are free to band together in small groups,
forgetting that by doing so they ignore certain advantages of scale.
Unix was definitely one of those, despite your assertion. Or have
you forgotten the Unix wars of the 80s? Linux as well, unless you've
forgotten the huge number of Linux distribution companies in the mid-
90s? (I remember the confusion of having to select from Slackware
vs. RedHat vs. ...)
Not having to choose, and depending on certain assumptions, lets
you focus on new things instead of having to think about the basics
all the time.
Of course it's wrong to ignore the basics. But computers are
wonderful (just like math) precisely because it is still possible for
a few people or even one to explore new or forgotten paths.
If you want macros, there's Lisp or Scheme or Dylan. If you want
other idioms, you could add them yourself. And if they are
useful enough, others will (slowly, all too slowly) use them.
Personally, I am rather annoyed that there hasn't been the next
great language. Back in the 80s and 90s I learned quite a few
languages: BASIC -> Pascal -> C -> "unix" (shell&awk&...) ->
Tcl -> Perl -> Python. Each one seemed more and more
powerful and flexible and usable. But I've not seen any new
language since 1995 (when I looked at Python) to tweak my
I will grant that Lisp or Scheme is the end-all and be-all of
languages. Where's the language between those and Python?
> Again, I disagree. It appears to me as though you've had some near
> death experience with Macros that left a sore taste in your mouth.
> Could you elaborate some on what your experience has been that turned
> you so definitively sour on Macros?
Or rather, it appears that Alex has observed problems with macros
(possibly in his projects, possibly from learning about other's
experiences) and decided that the advantages are not worth it.
That doesn't mean he himself needed a near-death experience.
It is possible to have a well-formed opinion that grabbing a live
power line which fell during a storm is a bad idea without having
done it before. That's another one of those things that let us have
a multi-billion population civilization ;)
dalke at dalkescientific.com
More information about the Python-list