[Catalyst] Re: Last Chance / Last Day: Web developmentplatformcontestand Perl / Catalyst

A. Pagaltzis pagaltzis at gmx.de
Thu Nov 30 22:18:37 GMT 2006


* Jonathan Rockway <jon at jrock.us> [2006-11-30 22:30]:
> What has the marketing gotten the community?  PHP and Ruby both
> suck in comparison to Perl (features / unicode / modules
> / speed / knowing wtf === really means),

It has gotten them mindshare.

So what if they suck? Do you think Perl is perfect? Might it not
be that these languages are *better* than Perl in *some* ways,
even if not in others?

> It sounds to me like they're spending all their money
> creatively lying about the facts, whereas the
> p(?:[56]|arrot)-porters are actually improving their languages.

The companies are funding marketing, not development. Comparing
them to p5p is pointless. TPF would be a better analogy.

> I for one don't really care if perl is "number one".  It's
> already better -- what more do you really want?

So you don’t think there’s anything Perl can learn from these
languages? If Larry had started with that attitude, we wouldn’t
have Perl today.

> It's too hard for dumb people to learn.  PHP's "everything is
> a scalar" and "everything is a function" is great.  You just
> slap a bunch of functions together and you're done! You have an
> unreadable and unmaintainable piece of crap, but who cares;
> you're done!  You gone done made a website thar!

No, the problem with Perl is it’s too hard to install and
mod_perl is too hard for cheapo hosts to offer. And even if you
take those hurdles, the only provision for web development that’s
part of the core Perl distro is CGI.pm, with no clear winner
among the web app frameworks and only marginally among the
templating systems. On top of all that, Perl on Win32 has been
a second-class citizen all along; it never enjoyed good support
for the secret weapon, CPAN.

In contrast, PHP is already on every web host on the planet and
installing it on a Windows desktop for casual development is easy
for dabblers. Once they get there, all they need to do is put
a few statements in a HTML file, because PHP is nothing but an
overgrown templating system, and watch it go. Sure, eventually
the result will be a mess, but for an outsider, it’s *MUCH*
easier to get *started* with PHP.

Elaine’s Law at work.

Also, because of the pervasive deployment of PHP, it’s a strong
contender for people who want to write web apps that are supposed
to be redistributed.

I think the success of mod_perl actually set Perl as a whole back
in the web arena. Ironically, now that other languages are trying
to play in there, and things like FastCGI and embeddable HTTP
servers are being tried, that might actually give Perl a lever to
gain back some of the foothold it lost to PHP long ago. I also
hope that Strawberry finally brings Perl on Win32 to full
citizenship.

> Now speaking as !(a dumb person) (ok ok, arguments about this
> off-list please ;), I prefer Perl's syntax because I can say
> what I mean and have the *compiler* figure out how to do
> things. [1]  Plus, there are powerful features for me to draw
> upon and exploit -- MI, functional elements (map / grep / sort
> {BLOCK} ...), closures, anonymous subroutines, references, data
> structures that make sense to someone with more than 15 minutes
> programming experience, etc.

Yes, PHP-the-language blows. Yawn.

> Perl will never win the language war because most people don't
> understand why it's good, and never will. (Ruby is "popular"
> because of 37signals' massive cash outlay, and because it's
> different enough to excite people by "being different".
> Throwing away 30 years of what I know about programming is
> a great idea!  It's fuuunnn!)

You seem to be throwing Ruby into the same bag as PHP. That’s
a demonstration of ignorance, at best.

Ruby is popular because it takes most of Perl 5, throws out all
the crappy crud, much of which Larry is also throwing out in
Perl 6 (type globs? wtf?), adds a sane OO system, which Larry is
also doing in Perl 6, and puts the whole thing into a simple
regular syntax that has a few *very* nice touches. The inline
closure syntax in Ruby is just beautiful; trying to do the same
thing in Perl makes me cringe.

As Piers Cawley put it, the buzz about Ruby and Rails is the
sound of a bunch of Java programmers finally discovering how
cool Perl is.

Sure, Ruby may suck in ways that Perl doesn’t, but the reverse is
also true.

> [1] PHP example -- look at preg_split, str_split, strtok, and
> explode. What a freaking nightmare.  That is, unless your brain
> doesn't work, in which case it's "cool to have fun toys to
> choose from".  The manual says which to use in which case, and
> by reading that and picking "the right one", the programmer
> gets to think "I'm smart, I'm OPTIMIZING!"  In reality, the
> programmer is doing the work of an if statement, but hey...
> "ZOMG I'M OPTIMIZING!"
> 
> I mention this because perl has one function, join, that does
> all of these (except strtok, which you can do with a plain
> regex).  In PHP, you have to use a different function to
> "optimize" for the plain-string case.  In Perl, if your regex
> isn't really a regex (i.e. /foo/), then perl can optimize for
> this and pick a faster algorithm. [/1]
> 
> Anyway, preaching to the choir here, so enough :)

Yes, yes, PHP blows. We already established that.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list