[Israel.pm] Language evolution

Jason Elbaum jason.elbaum at gmail.com
Wed Jan 9 02:22:03 PST 2008


As programmers, we love to complain about how complex our development
environments have become - languages, OS APIs, core libraries, etc. It
was all much simpler 30 years ago.

And indeed it was. But that's because computers were solving much
simpler problems then. They weren't doing networking, or windowing, or
threading, or internationalization, etc. Or if they were, they were
doing them using specialized environments and customized languages,
not generic user-oriented systems.

You can't eliminate complexity from complex problems. You can only
rearrange or restructure it. Where C++ or Java or Perl (etc.) doesn't
support a particular form of complexity, the client code must do it
instead. And it must be reimplemented by each system, often in
incompatible ways. Complexity omitted from the language ends up in the
code.

The optimal boundary between the language and the code (or libraries)
is debatable. And the impact on complexity of user code can be
ambiguous. Operator overloading, for example, lets you write your own
number classes and use them like built-ins, including generic
programming with them. But it also means that you can't look at "a+b"
and know what it's doing unambiguously. There's a case to be made on
either side.

Perl 5 is missing a built-in simple syntax for object oriented
programming, and all the cruft and crud of using OO in Perl is shoved
into the client code - or CPAN modules, which are nonstandard and not
always supported. That's a weakness of Perl, and it's good that Perl6
will be fixing it.

Personally, one of the things I love about Perl is what I call
"fingertips" - having everything at your fingertips. You don't say,
"use regexps. r = new Regexp("a*...")". You just use your regexp:
/a*.../. The same goes for OS calls and math functions and hashes and
all kinds of other useful everyday functionality. They're just there,
at your fingertips. Unlike in C++, or Java, or (to a lesser extent)
Python.

But there can come a point where you forget how many fingers you have,
or what they're called, or how they work. Or where the number of ways
to quote a regular expression confuses your syntax-highlighting
editor, or your colleagues. It's about balance.

I do wonder if Perl 6 has gone too far down the route of featuritis.
Time will tell.


Jason Elbaum



More information about the Perl mailing list