[ale] What to use
Joseph Knapka
jknapka at earthlink.net
Wed Apr 23 09:44:37 EDT 2003
Fletch <fletch at phydeaux.org> writes:
> >>>>> "John" == John Wells <jb at sourceillustrated.com> writes:
> Fletch said:
> >> At any rate, before this devolves into a dissertation on why
> >> Python blows :)
>
> John> Actually, that'd be interesting to read...
>
> *sigh*, OK I'll bite.
>
And I'll bite back :-) But no Perl bashing here, just pointing
out that few of the warts you mention remain.
> A quick top few of the warts:
>
> * the whitespace thing (which pretty much means no `python -e ...',
> which means you have no quick recourse to it from the command line)
This is always the first thing on everyone's "I hate Python" list. I
hated it too, before I really started using the language. Now I really
like it. The structure of the code is obvious at first glance; you
don't have to parse punctuation to figure out what the code says. On
the other hand, I've gotten so used to it that I now have a really
hard time reading C or Java code that isn't properly indented :-)
Your point about -e is well-taken. However, it's easy to fire up
an interactive Python session and type at it, or feed it a HERE
document.
> * despite its vaunted OO-ness, it's got gaps (e.g. len(array) instead
> of array.len; come on even Javascript gets this right :)
This is improving; I think Python 2.3 has pretty much fixed all of
this kind of stuff by unifying types and classes. Though this
particular issue has never bothered me - len() is a generic method,
applicable to anything that acts like a sequence, so it makes sense
(IMO) for it to be outside any particular class or type's
namespace. One of the things I really like about Python is that it
makes generic programming (and its complement, introspection)
trivial. Perl probably does, too, but I'm not sure about that.
> * despite its vaunted regularity, trailing commas are sometimes
> syntactically significant with different effects in different
> contexts (e.g. tuple creation for assignment, newline or not for
> print)
Yes, this is annoying.
> * lambdas aren't (aren't really closures, that is)
Lambda is definitely a wart. But Python has had real lexical scoping
(including closures) for some time; you just need to name them instead
of making them anonymous.
> * the whole lack of real namespaces (although this has gotten better)
I'm not sure what you mean here. Python's namespace mechanism seems
just as usable to me as, say, Java's.
> * no CPAN (and no, the Parnassus thing doesn't come close to CPAN)
Agreed. However, I can count the number of times I've needed a module
not included in either the standard Python.org distro or (for Windows)
ActiveState's, on the fingers of one thumb.
[snip deserved praise :-]
Now there is one very serious problem with CPython, which is that
it can't (due to some fairly deep-seated interpreter design
decisions) take good advantage of multiprocessor hardware,
unless special steps are taken. Jython, however, does not suffer
from this deficiency, as it uses native Java threading.
there-should-be-one-obvious-way-to-do-it-ly yrs,
-- Joe Knapka
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list