Re: Holy Grail

Larry Wall (lwall@netlabs.com)
Mon, 4 Apr 1994 17:50:24 GMT

In article <Cnnsnq.EFH@eo.com> pete@eoc.com (Peter Cockerell) writes:
: Thanks for the comparisons. Your cons for Perl v.4 are exactly the
: things I don't like about it, so we agree there! V.5 sounds
: interesting, but it doesn't seems as though he's done much to improve
: the syntax/readability.

Well, it depends on how you count. The upshot of most of the Perl 5
changes is that it's possible to write programs with about half the
punctuation of Perl 4 programs. To enable this, a several new features
were added to the language. But the old language is still accepted, so
in some sense things got worse. On the other hand, I think that the
subset of the language I'll be using in the future is a much cleaner
language. For instance, all the funny magical variables now have human
readable names. Subroutines can be called with the same syntax as
built-ins. And I think it's a nifty thing that you can implement
"indirect-object" functions like

import POSIX qw(setlocale sigprocmask uname);

or

$kitty = new Cat
Hair => Long,
Pattern => Tiger;

without requiring the language to define "import" or "new" as builtins.
They're just ordinary method calls on the class. Most classes don't
even define "import"--they just inherit it from the Exporter class.

Another factor is that Perl 5's error messages are much improved, so
you're likelier to be able to figure out what went wrong syntactically.

But Python's a nice language too. I just happen to find Perl a
bit more comfy. [Insert obligatory Monty Python joke here.]

: I'll have to check out Python; I think I'd put
: readability/comprehensibility pretty far up on my list of desirable
: traits in a language.

Mee too, mee too!

Larry Wall
lwall@netlabs.com