Monday, January 28, 2008

CIO Magazine: What Decade is This?

I ran acrosss an absurd article called You Used Perl to Write WHAT? on one of my Java feeds.
Perl is the granddaddy of the open-source scripting languages, with the 1.0 release seeing the light of day way back in 1987. By comparison, PHP wasn't released until 1994, and Python didn't have its 0.9 release until 1991—only the Unix shells themselves have an older pedigree.
While there are no doubt some pretty intense apps written in Perl, it's time has passed. There are some rare but unfortunate situations when writing shell scripts is justified (*UNIX startup scripts for one), there is no excuse for initiating any new Perl projects in the 21st century.

Perl is not a wise elder. Perl is on life support and it is time to remove the feeding tube or call in Dr. Kevorkian.

4 comments:

dre said...

I do find it strange how many people can't move from Python or Perl to Ruby or Groovy.

However, at the same time, Tcl and Expect seem like home to me. Tcl was my first scripting language, before Perl came out.

Unix shell is hands-down the best and most useful language I have ever set my hands on. If I'm lucky, I will continue to use it everyday and teach it to my children and my childrens' children. Prototyping in C and shell can save months of work - even if you end up writing your application in Java, Groovy, PHP, ASP.NET, VB.NET, C#, or Ruby (these are the most popular/trendy languages).

Which languages would not exist without Perl? Python would probably exist, but I could easily argue that the popularity of both Ruby and PHP would be closer to non-existent (than today's prolific use of the languages). So Groovy and others would also not exist.

On my computer right now, there are thousands, maybe millions - of computer programs written in C/C++ (and possibly Assembler, or a mix). The next most popular language is VB.NET or C#. I likely rely on VBScript, Javascript, XUL, Perl, Python, Ruby, Tcl, and even Squeak more than I do Java. I don't think there is a single Groovy script on this machine - even though I'd go as far to say it's my favorite language.

I think C# is the best/most-efficient/most-useful language, but I don't really code in it. Maybe I should start, but that's what I said before I stopped writing everything in Perl and started writing more in Python, Ruby, and back to C.

When I started in college, my first "professional" and "academic" language classes were in Ada. I was so happy that they weren't in Pascal (and still to this day, but Delphi isn't bad from what I understand). Later, we learned C and stuck with C. I wish I had learned Smalltalk, Lisp, Lua, or even C++. However, by the time I was in my third year - writing HTML was way more important than writing any other programming language. By my fourth year (and into the workplace) - Perl was the only language for CGI until PHP made its appearance. Although I did code CGI in C, it was nowhere near as complete as Perl at the time.

In 1994-1995, Perl was a framework. It was the only web framework. In early 1996, I specifically remember printing out the entire guides to PHP - reading them all intently - and then never writing as much of a single line since then.

There was a time shortly thereafter (in heavy Microsoft environments that had poor IT and were constantly changing) where VBScript was my lingua franca. Now, my best research is all in XHTML, CSS, or Javascript. These light scripting languages that work everywhere is what it's all about. Perl used to be like this ten to twenty years ago. This is one of the primary reasons I love shell.

Microsoft Visual Studio, SharpDevelop, and Monodevelop provide an almost monopoly (maybe this is the wrong word) over Eclipse. I still prefer the command line with Makefiles and vi, but I'll use whatever a team of developers is using in some situations. I was never a fan of Xcode or Interface Builder, but I could see advantages to using something like Anjuta/Glade or even Geany.

C, C++, Java, Perl, Python, C#, and Ruby all have their places in the corporate world. If I was a CIO - I would allow anyone at my company to program in one of these languages, while making special cases for other languages. I would rather people use a strong framework, good patterns, and code generation instead of languages that are incomplete. None of these seven languages are incomplete.

Matt Franz said...

In my case it is once you use Python or Ruby there is not point of writing anything substancial in Perl anymore. Which for me was '99. Too ghastly ugly. My Perl code was too awful to remember.

As for TCL, I always hated TCL because it was de facto official test automation language out in San Jose and much of Cisco Austin was a pure Python shop.

I would say no great loss if PHP never existed or the Perl-isms in Ruby.

- mdf

dre said...

In my case it is once you use Python or Ruby there is not point of writing anything substancial in Perl anymore. Which for me was '99. Too ghastly ugly. My Perl code was too awful to remember

So you're saying your Perl code was bad because of the way that you used Perl. I think Perl can be fantastically good, but just often isn't. Perl can have coding standards and all the framework tools that Ruby or Python have... they are just out-of-reach for the lazy programmers...

As for TCL, I always hated TCL because it was de facto official test automation language out in San Jose and much of Cisco Austin was a pure Python shop

Ah... I was at Cisco in San Jose, but only until May 2000. I remember using quite a lot of Tcl during those years; and Perl. The Cisco Austin group always had a great reputation, but I'd be curious to hear more about any controversy or battle you had with other groups / testers.

I would say no great loss if PHP never existed or the Perl-isms in Ruby

If PHP never existed the web would still be written in Perl. Or worse - Classic ASP. At least Perl has perlsec. Although I'm not certain that RoR/Django/TurboGears/Pylons have taken the web by force or are going to. If I could eradicate all of the Perl, VBScript, ASP/ASP.NET, PHP, and JSP on the web - I certainly would replace them with Grails or HDIV+SpringMVC. You can re-code it all and I'll stick to breaking things.

Matt Franz said...

Although everything is ultimately the lazy programmers (or script-writer, which are often not even real programmers and therefore need more constraints right!?) fault, the language does matter in terms of how much rope it gives the coder. The Python (vs. Perl) readability argument is obvious and well understood and not worth repeating here.

No specific battles that I remember, beyond fighting standard ways of doing things? What you don't use Pageant to generate traffic are you crazy? Just the mindset of dealing with San Jose (or RTP) dev-test or worse the folks in Chennai.