Thoughtstream | Resources

2005 Interview with DevSource.com

with Lyn Greiner
(March 2005)

Lyn

What place do scripting languages (in general, and Perl in particular) have in today's computing environment?

Damian

Very simply, they're the glue that holds complex systems together. They allow developers to hook together commercial and Open Source software packages, and to coordinate the resulting systems.

But, increasingly, they're also fully fledged development platforms in their own right. For example, many large commercial applications are now programmed predominantly in Perl or Python. And, of course, PHP is the bedrock on which a huge number of on-line businesses are built.

Lyn

Where do you see them going? Where will scripting be in five years? Do you see it being replaced by compiled languages?

Damian

If anything, I think the trend is in the other direction: interpreted or "just-in-time" compiled languages will increasingly take over from pre- compiled languages. Compilation will eventually come to be seen for what it is: merely an optimization tool, and one whose use is almost always premature.

It'll still be useful when shipping stand-alone code beyond environments you control, but increasingly compilation will be seen as a packaging technique.

Of course, the other aspect of that is that the line between compilation and interpretation--which has always been a little arbitrary--will blur even further. Perl already has an on-the-fly compilation phase in front of the interpreter, but it targets Perl's internal "assembly language", rather than the underlying hardware's.

The future will be about consistency across platforms, so compilers will increasingly need to target abstract "virtual machines" (like Sun's JVM or Microsoft's CLR) that are layered over the hardware. At which point, are you compiling or interpreting? And does it matter?

Lyn:

What do you see as the attraction of scripting languages? Why?

Damian

Interpreted languages do two things much better than compiled languages. Firstly, they provide more sophisticated programming tools and support for more advanced programming techniques. For example, Perl provides hashed look-up tables and arbitrary-length arrays as core data types. C doesn't even have a proper string type. Likewise, Perl's data sorting facilities are integrated into the language, so the sorting criteria are directly programmable.

Having all the basic tools of programming (i.e. high-level data types and common algorithms) built into the language, rather than having to build them yourself, means that you need to write less code to solve a given problem. Scripting languages let you use power-tools and pre- fabricated panels to build your home, instead of having to build a stone axe to cut down the timbers to shore up the mine to extract the iron to forge the saw to mill the lumber to get the posts to sink the foundations on top of which you'll eventually construct your dwelling, once you've gone back to the mine to get more iron to cast an adze and some nails and a hammer, and used them to build a ladder and...well, you get the idea.

The second major attraction of intepreted languages is that they let you do incremental development very quickly, without the constant irritation of sitting around waiting for compiles to finish. Many Perl programmers-- myself included--develop directly in their favorite text editor: write some code, hit a function key, and see it execute immediately. No frustrating pause, no break in your concentration. That "immediacy" and "seamlessness" is a huge benefit, and often overlooked.

Lyn

What are their drawbacks? How are you addressing these issues?

Damian

Execution speed is still a major issue. In Perl we're addressing that by building a new blazingly fast virtual machine called Parrot (www.parrotcode.org) on which the next major version of Perl will run.

Lyn

Is scripting adoption by businesses growing? Shrinking? Why do you say this?

Damian

I really only get to observe this issue through the tiny window of my own training business, but everything I see indicates that scripting continues to be at the core of most business's on-line activities...even if no-one except their system administrators, DBAs, and core developers knows it.

Languages like Perl and Python and PHP are what hold their I.T. infrastructure together. They're the tools that allow organizations to move data between databases, between formats, between applications, between platforms. As the need to do that continues to grow (and it will), scripting languages will continue to grow with it.

Lyn

If there were one core thing you could change about scripting languages, what would it be? Why do you say this?

Damian

If I could change one thing it would be the misperception that these languages are toys; that they're not suitable for "serious" development. There is any amount of evidence to the contrary, but the stereotype persists, and it keeps too many programmers from being able to use these extraordinary tools that would make their jobs easier, and their products better.

Lyn

What sort of changes and enhancements are you planning for Perl in the next year? Why?

Damian

Wow, where do I start. The Perl 6 project (dev.perl.org/perl6), whose goal is to develop the next major version of the language, is finally coming to fruition. Over the next twelve months we'll see two new Perl compilers being built in parallel, bringing a huge range of new and powerful features to the language. It's an exciting time.

Lyn

What are the biggest things users have asked for?

Many of the biggest things are little things: fixes to some of the few rough edges that remained in the language, such as the ability to write:

if (0 < $number < 1) {...}

or a "print line" command, to avoid having to manually add a newline to every output statement.

Of the bigger "big things", the biggest is clearly the new object orientation features. We're adding declarative classes, strong encapsulation, multiple dispatch, component-based class construction, and cross-language support to the core of the language. Developing OO applications in Perl 6 will be vastly easier and cleaner than it was in Perl 5. We're aiming to become the standard against which other object-oriented languages are measured.

Lyn

What is one cool thing developers can do with Perl that they might not think it could do?

Damian

That's another of those "where-to-start?" questions. I don't think I can stop at just one. So here's a quick list of two dozen cool things they can do with Perl: