Saturday, December 5, 2009

Extra parsing for better errors

Something that I think is a unique feature of Perl 6 is that it goes out of its way to parse things that aren't in the language so that it can give you a really good error message. For instance, in Perl 5 and other C-like languages there is a for loop that looks like this:

for (EXPR ; EXPR; EXPR ) BLOCK

Perl 6's version of that loop doesn't start with "for" since it uses "for" exclusively as an iterator of lists. However, if you happen to write a for loop as above, there is code in the standard Perl 6 parser that matches it and tells you what you did wrong and how to fix it. If you read the grammar for Perl 6, you find this sort of thing all over the place.

Perhaps it's just that Perl is in the unique position of having two major versions of the language that have significant differences in syntax and semantics that such extra parsing is almost required. But, I wonder how many other languages do this to the extent of Perl 6?

Tuesday, December 1, 2009

an annoying meme

I've been following the twitterverse off and on for a while now. Quite often the "Perl is dead" meme rears it's ugly head and I have to wonder why there is such animosity towards Perl. Sometimes it's just ignorance (occasionally willful ignorance) about the state of Perl, but many times it's random vitriol against Perl.

Perl is clearly not dead.

There are easily 5 or 6 conferences a year on Perl. Off the top of my head, there are 3 YAPCs (Yet Another Perl Conference): YAPC::NA, YAPC::EU, YAPC::Asia; The Perl Conference; The Nordic Perl Workshop; Frozen Perl. There are probably several I've forgotten or just don't know about as well. CPAN still has continuous contributions and growth. There are bunches of blog posts about perl every day (See the Perl Ironman challenge). Et cetera.


So what do these people have against Perl that they would say it is "dead"? Does its continued existence cause them such pain? Why do they stomp all over Perl? If they don't like Perl, that's fine. I don't like COBOL. If the topic comes up, I might mention that I don't like it. However, I don't go around saying that COBOL is dead.

Also, what do they get out of it? I think it's the rise they get out of Perl people. Blog posts like this one or even the twittered responses of "Perl is not dead" satiates their child-like desire to gain attention by picking on Perl much like siblings pick on each other.

Maybe we Perl people should wear the "Perl is dead" meme as a badge of honor. I mean, in a way it's nice to know that they consider Perl such a threat that they keep attacking it.

I don't know ... this particular meme just bugs me.