Re: PYTHON VS. PERL VS. TCL

Aaron Watters (aaron@funcity.njit.edu)
Thu, 20 Apr 1995 12:16:52 GMT

In article <9504181433.AA17470@seelebrennt.lehman.com> jredford@lehman.com writes:
>> I do not usually reply to obvious flame bait such as this....

Well I do. I do it because it's kinda fun. I also think its good to
correct what I see as mistakes before they become "conventional
wisdom" (history suggests that unanswered propaganda evolves into
"fact"). You have some good ideas, jredford, but a touch more
diplomacy (and perhaps minimality) might be advised. A lot of your
concerns are valid, and could be fixed -- especial if you turn down
the decibel level so we can listen without going deaf.

>Perhaps if you had considered Tcl you would have chosen differently. I
>would likely choose Scheme myself. Tcl makes writing your own langauge
>constructs pretty damn easy. Python makes it pretty damn impossible.

If you want to write your own language within a language, try Common
Lisp's macro facility. Here a programmer can build his/her own idioms
and constructs which no other programmer in the world will ever
understand, possibly including 'self' 6 months later (believe me, I
know). It's lots of fun, but probably not a good idea. You'd be
surprised how much you can do without resorting to building your own
constructs -- object encapsulation and procedural abstraction go a
long way.

[BTW: if you want to interpret another language in Python, I have
a parser-generator you might be interested in. It doesn't scream,
but it's not as slow as you might think!]

I liked your suggestion that Python should have earlier bindings,
so that an undefined os-specific function is detected at load time
and not in the middle of a computation. At present this would suggest
that one should use

import neat_function from os_specific_module

(to get an error on load) in place of

import * from os_specific_module

or

import os_specific_module
...
os_specific_module.neat_function(...)

and that implementations should never use errors such as

# os_specific_module for itty-bitty-machines
def neat_function(...):
raise SystemError, "not implemented on this itty-bitty-machine"

In the long term, I think it might be nice if Python could do more early
module/function bindings at load time. This would prevent some abuses
(which, unfortunately, can sometimes be useful) and have the added
benefit of making Python run faster. -a.
====
In the long term, we're all dead. -Keynes