As much as I think there's something to be debated about JO's
assertions...
Steffen Beyer wrote:
> > - It is possible to make languages with execution
> > speeds like C or C++, that use dynamic typing
> > successfully, whilst being high-level enough in the
> > creation of abstractions to "glue" things together quite
> > nicely and easily.
>
> Yes: Perl.
No, not Perl. Perl's execution speed is three to four orders of
magnitude slower than comparable C code. I can't vouch either way for
the Perl compiler. I also have my doubts as to Perl's status as a
dynamically typed language. Yes, you can make a variable and set it to
anything; but, the fact that you must have a different comparison
operator depending if you're comparing strings or numbers says something
against its dynamicism.
> > The white paper argues that you can't have a jack-of-all-trades
> > language. Either you have a strongly typed language, which
> > gives high speed and manageability but makes gluing hard,
> > or you have a weakly typed language with the opposite properties.
>
> IMHO, "tertium non datur" doesn't hold for Perl...
>
> Because the philosophy of Perl is quite distinct from all
> other programming languages (see the interview of Larry
> Wall and Tom Christiansen in WebWeek - a link to the
> article can be found by following links down from www.ora.com),
> it combines high speed, manageability and maintainability
> (if so written, that is), *and* easy gluing (see "How Perl
> saved the human genome project" in "The Perl Journal", for
> instance).
>
> And Perl actually *is* sort of a "jack-of-all-trades" language...
I'm sorry, Perl is not a jack of all trades. It is an abhorrent
language for large projects that demand maintainability, and even LW and
TC would agree with that statement. I have three programmers right now
trying to rid our company of thousands of lines of unmaintainable Perl
code. The scariest part is, some of that code is my own, and I am one
of the most anal style programmers at the company (30 character function
names are not uncommon). The problem is, Perl does not scale. You can
write great small programs in it, and I still do, but you cannot grow
the code in any maintainable fashion. One of the programmers is a Perl
fan, but even he agrees that attempting to write this system in Perl was
a mistake.
Perl has its place -- as do Tcl, Python, C++, Scheme, and Self -- and
is great for certain tasks. But, I agree with Ousterhout on this one:
there is no end-all-be-all language out there.
Now his thing about implementation inheritance not increasing code
reuse, that I have a problem with. I do think that once hierarchies
become too complex, implementation inheritance does become more of a
problem than a benefit, and has the effect JO is talking about. But, if
the OO nature of a language is used to create minimal hierarchies --
many flattened hierarchies, with at most 2 levels, not necessarily
attached to a common root -- I have found that implementation
inheritance can be an incredible, maintainable tool.
- Chris
|