The State of Scripting Languages
Esther Schindler writes to tell us that Lynn Greiner has another look at the state of the scripting universe as a follow on to the same topic three years ago. Greiner talks to major players from each of the main scripting languages (PHP, Perl, Tcl, Python, Ruby, and Javascript) to find out the current status and where they are headed in the future. "The biggest change since 2005 has been the growth of richer Web applications that perform more of their computations in the browser using JavaScript. The demand for these applications has forced developers to learn and use JavaScript much more than before. There's also been a lot of interest in Ruby, another dynamic language, spurred by the release and growth of Ruby on Rails. As a result of these changes, many developers are becoming more comfortable with dynamic languages."
Preemptive strike! You're a moron, and Java != Javascript!
schindler's list looks neat. I'll go read it sometime.
Show this to your friends and family that don't know what a real hacker is
serious question --- is perl 6 Open Source's answer to Vista? Some of the new features are added to perl 5, but is perl 6 is a wasted effort?
Do you even lift?
These aren't the 'roids you're looking for.
Nah, I'm not really caught in a crossfire. I still prefer my trusty old Perl over these illegitimate kids and cousins - PHP, Ruby, Python, etc etc.
slashdot rocks
Can someone point me to a comparison matrix for PHP, Perl, Tcl, Python, Ruby, and Javascript detailing advantages and disadvantages, pros and cons for each? I hope someone will do precisely that and I will be glad.
Note: I only know PHP and Ruby.
Can anyone come up with a really good definition of a "scripting language"?
As far as I can tell, it's a vaguly amorphous definition based on some notion of interpretedness, but C interpreters exist, for instance, and TCC can be used to run C "scripts".
SJW n. One who posts facts.
First of all, it was an argument about scripting languages - the only difference is syntax. Yeah, yeah, one language make it easier for the programmer to manipulate text or to develop some functionality for a particular task. But this jazz of "the right tool for the right job" is non-sense. We're talking about programming languages: not screwdrivers, drills and hammers. It's all going to be a processor's instruction set one way or another.
Secondly, this article is in CIO. WTF does a CIO have to worry about languages for? That's the development manager's problem. The CIO's problem is the management of the organization and the technology big picture. How said technology is implemented isn't his problem: that's just minor details. I guess a micro manger would be concerned about a scripting language. If that's the case, he needs to quit and get a tech management job.
Just my two cents.
No-one said otherwise. The only thing in TFA I could see to which you might be erroneously referring is the Mozilla Rhino, a javascipt implementation for Java -- which is exactly what it is. Maybe someone's in a bit too much of a rush to use the word "moron"?
Caveat Utilitor
John Lam leads the IronRuby team at Microsoft.
Okay, John Lam is doing amazing work and IronRuby will likely be of some importance in the Ruby world one day, but "major player"? Microsoft's a major player generally, but in the Ruby world they are not. There are 1001 more notable people in the Ruby community who probably would have been up for this article - Chad Fowler, Dave Thomas, David Heinemeier Hansson, Matz himself.. They seem to have picked senior figures for all of the other languages (except PHP). CIO.com is not that poorly connected, surely?
This essentially summarizes the reasons I prefer to use Perl: the quality of the implementation, and the good libraries. However, there is a dark side that we Perl lovers don't talk about much, which is that although Perl has good quality and good libraries, many of the libraries are not of good quality. My purpose here isn't to name names and rip into individuals who have contributed open-source code to CPAN out of the goodness of their hearts, but honestly, some of the code on CPAN is of very low quality and/or very poorly maintained. Quite a few CPAN libraries are basically glue that interfaces to some C code, and when you look at some of that C code, it looks like examples of the worst coding practices of the 1980's, before the internet existed, and before it really registered on coders' consciousnesses that buffer overflows, etc., were not just bugs but security holes. I've had a couple of bad experiences where I hitched my wagon to a particular CPAN module, and later had serious problems because that module was not actively maintained. E.g., crippling bugs would go unfixed for a year at a time.
On the other hand, I'm not sure that any of the other scripting languages come off any better. What the article says really is true: the base implementations of the other scripting languages are really not anywhere near as solid as Perl's is -- probably partly because Perl is so much older than the others, and therefore more mature. But this may change a lot in the future. Perl 6 is eventually going to be ready for prime time, and there will be a certain amount of chaos and confusion and bugginess at that point, as everyone adapts to the new environment. Also, Perl's head-start in terms of maturity will start to mean less and less as time goes on and the other scripting languages start to get more mature.
Find free books.
Shell scripting is alive and kicking.
Python isn't a scripting language. It's a fully featured object oriented language. It just so happens that it's awesome and flexible enough to be used for scripting.
ilovegeorgebush
I've been using VMS-DCL http://en.wikipedia.org/wiki/DIGITAL_Command_Language as my scripting language of choice since 1988. Of course it only runs on VMS/OpenVMS which is problematic....but I've got 20-year old scripts that are still running just fine today.
(I've even written a Tiny-Basic interpreter in DCL!)
They all still suck for about the same reasons they sucked three years ago.
The problems of Perl are well known, but it's probably the closest thing to "write once, run everywhere" that we have. Perl is essentially static at Perl 5. There's a Perl 6 effort, with a major language redesign, expected to ship shortly after Duke Nukem Forever.
PHP is gaining because it's a simple way to do dynamic web site back ends. It's not a great language, and limited to its niche, but useful there.
TCL was never a very good programming language, and it hasn't improved much.
Python is a nice language, but it still suffers from the limitations of the CPython implementation. It's slow, and integration with standard C modules is troublesome. Python has distro packaging problems - the Python maintainers don't coordinate with the maintainers of key modules, like the ones for talking to databases, and as a result Linux distros don't consistently ship with a CPython and a set of modules that play well together. That's why Python hasn't replaced Perl.
Javascript is a moderately painful language, yet we all have to use it. The object model is ill-designed; borrowing from Self was a mistake. Too much use is made of "eval", creating the "JSON" security hole. (Memo to language designers: don't combine the primitives for reading a string into an internal representation and for executing the internal representation. LISP has the "reader" and "eval"; Javascript has one function that does both.) Variable scope, given that the language has "var", is badly thought out. (Python is one of the few languages that does implicit declarations well. Perl had to retrofit "my", and Javascript had to retrofit "var", and in both cases, implicit declarations stayed, confusing the issue.) Because of this, Javascript has scaling problems. Attempts are made to paper this over with "toolkits", usually a bad sign.
I can't really say much about Ruby.
It's interesting that nobody uses Java applets much any more. It's worth understanding why that failed. But that's another subject.
I've had the same experience with CPAN: the code is often not very good, or the library doesn't really do what you expect it to do - a lot of contributions seem to be half-baked. In contrast, I have had a good experience with Tcl libraries. Perhaps one reason is that people put the half-baked stuff on the wiki (http://wiki.tcl.tk), where it is labeled as such, and don't present a full package until it is reasonably mature.
the above post was a pun. He wasn't insulting jews or anything. Last time I checked, puns weren't classified as a troll.
What did they use to code the Matrix?
To hell with scripting languages.
When are we going to get a new high-performance, clean, simple, meta-programmable, incrementally-compilable language to replace C++ with?
As a game engine developer, I'm hella-sick of C++. But there just isn't anything else out there that can get the job done. Everyone is focused on these dynamic languages with JITs and bloated runtimes and garbage collectors. They may give decent performance if you can arrange a suitably ideal environment for them to run in. We can't use them for game engines, though.
I hear a lot about Ruby performance - specifically, "Ruby/Rails can't scale". The odd thing is that this is in the context of a web app, where the overhead of the interpreter opcode execution is dwarfed by the cost of going over a socket to pull data across a LAN from a database. Scaling a web app isn't about the language; it's about architecture, judicious SQL optimizations, and caching.
Oh, and if you're using rcov to measure your Rails app's code coverage, try this patch to prevent rcov segfaults. It doesn't fix the root problem, but it's a start.
The Army reading list
I was surprised that Groovy didn't appear anywhere in the article. If there's a dynamic language poised to convert the enterprise crowd, its Groovy. Able to compile into Java bytecode, compile Java code, and directly exploit the huge base of Java, but without the cumbersome Java syntax. I wouldn't be surprised to see Python and Ruby supplanted by Groovy in a couple of years.
007: "Who are you?"
Pussy: "My name is Pussy Galore."
007: "I must be dreaming..."
Python has been my language for years. The pure beauty of the language together with the huge library did it for me. Plus, it's very easy to program python. Seriously. Just today, I've implemented an algorithm with a long, long loop and a lot of arithmetic operations. Python took 5:30 where Java took 10 secs. I'm serious, Python is SLOW, and last time I've checked, Ruby is even worse. (Interesting sidenote: C++ took 11 secs). I seriously love scipting languages, but the speed it horrifying. I'll stick to Java for a while.
You're recalling the Osborne Effect. I sure hope that doesn't befall Perl.
LOLCode | yes
Turing machine descriptions | yes
The Raven
I really wish that I didn't have to learn different languages that all do basically the same thing with different syntaxes and styles. Especially since they all get compiled into highly optimized code that is basically the same for the same jobs, data structures and algorithms, regardless of the different language in which the source is written. I'd like to write in whatever language I want, see it compiled into corresponding bytecode, and then later reconstruct it into source in a different language that's functionally identical.
The really hard part is not so much getting all the different source codes in the different language into the same bytecode. It's getting that bytecode into readable source in different source languages.
Perl's Parrot VM is supposed to execute bytecodes in all these different languages. I wonder whether we'll see anytime soon a decompiler that can let us use any related language we want, and de/recompile automatically into fairly clear and simple source in different languages, so other programmers can collaborate with us, each in our own favorite idiom. Or even better, import code in any language (of a limited set of closely functionally related ones), not just the one we're actually programming in, and see it converted. Not just link to a library, but actually convert and merge the source code files together.
--
make install -not war
Clearly you haven't heard of Jaxer.
I really like DHTML + JS + CSS for dynamic content. I downright love CSS; it takes time to learn, but it is just awsome. It's really just a problem of getting browser vendors to support a cross-platform standard for the DOM tree (I think we all know who I am talking about). Even with the mess that we have now, js libraries like prototype.js and mochikit have done a pretty good job of abstracting the browser quirks out of our code and given us a means to develop quality, working web applications quickly and easily.
Or, you could scrap all this progress and start over on a new standard. Good luck with that.
weirdest thing I ever saw: scientology advertising on slashdot.
Perhaps. I suspect CPAN ironcailly also suffers from it's own ubiquity and ease of access. Any highschool student can whip together a quick Perl module, and I suspect more than a few do. The result is that poorly written or only half-baked projects end up there.
By contrast, the only people writing Tcl modules are those serious about using the language, and that immediately introduces a selection bias.
Several years ago I wrote a javascript module for Asterisk open source PBX
More recently I added it for my own project FreeSWITCH ( http://www.freeswitch.org/ )
We actually also support LUA, Python, Perl, JAVA and MONO as ways to script telephony apps.
It's quickly becoming a great new way to prototype and deploy audio driven apps for your phone system.
PHP and Perl don't really deserve to be labeled "scripting languages" in my head either any more. PHP has had growing object oriented capabilities for ages - PHP 5.3a1 even got lambdas w/ closures. PHP is a fairly great language; it got a bad rap due to the way it enabled horrible security practices so well in the PHP3 days. I think I prefer Python/Django due to the more expressive syntax and superior templating, but PHP is good and getting better. Is it dynamically interpreted? Sure, but you can use bytecode caching to save compiled copies. Likewise, Perl may be suitable for use as a scripting language, but it has obviously become a lot more.
Dynamic Languages Jobs Barometer
007: "Who are you?"
Pussy: "My name is Pussy Galore."
007: "I must be dreaming..."
I'm not sure what you're sick of with C++, but I've been writing objC lately for the iphone, and I'm definitely enjoying it a lot more than I ever enjoyed c++. (Although that may be just because I like Apple's nextstep object hierarchy more that I ever liked the c++ libs)
Of course there's a lot of crap on CPAN. But there's also a lot of really good stuff, and there are tools to help you find the best of the good stuff. Besides which, having someone else's complete and utter crap to work with can still give you a head start compared to doing everything from scratch. Not to mention, in one-off projects you can sometimes just use the utter crap, get the job done, and not have to tell anyone.
I think the W3C should evolve the scripting area to recognize and have UI/App components in the language. Mesh CSS/DOM/JavaScript/Ajax along with accessibility and usability as a new toolkit and standard. That's why Dojo and the likes are so popular. If the W3C evolved the scripting/development toolkit for that, it would make sense to me.
Here's what's wrong about scripting languages. Not a single one does Unicode properly. In fact, there are only two environments that got it somewhat right - Java and .NET. Seriously, guys, WTF? Why are single-byte chars even possible in this day and age in the context of a string?
Man, that's just the best troll ever... I'll just try that game ASAP
A good browseable documentation. CHM rules.
P.S. And, btw, ask the .Net crowd about scripting languages. M$ already brainwashed them. Will you see, C# is not scripting, CLR is not interpreter. Scripts sucks because they sucks and C# is better. Scripting languages are dead. End of topic. Move on.
Really? Is that what the culture's like? I am not really a part of that so I don't know... My impression was that .NET had a lot to offer for users of Unix scripting languages - really good interaction with other languages and applications' scripting interfaces, good bindings to system facilities, and the ability to take advantage of the CLR for just-in-time compilation...
Bow-ties are cool.
You are quite right. But it still applies to evil creatures like PHP.
Damn straight...
I have serious doubts about the usefulness of this kind of language feature, compared to its painful consequences...
Bow-ties are cool.
I think this makes a certain amount of sense when 99% of what you're doing is dealing with text (command-line arguments, form input on the web, database queries, whatever) - it makes it very convenient to deal with text in terms of the usual meaning applied to that text, and apply your results back to a textual context without a separate operation.
I don't particularly like this in general - but I would say that I'm not prepared to write it off entirely...
Bow-ties are cool.
It's amazing how much people forget. 'dynamic languages are gaining acceptance' - some of the first programming languages were dynamic. Almost all of the 'innovations' we have seen in 'scripting' languages in the past ... 20 years or so have been done before, in LISP, normally in the 70s.
*sigh*
If you your string concatenation operator is distinct from your addition operator, it's simple to tell whether you are dealing with a string or a number from context. Plus it lets you do neat stuff like:
my $filename = 'file0000';
$filename++; # = file0001
Why write more code than you have to?
And if you have more than 10000 files? Not to worry, your filename will advance from "file9999" to "filf0000" - the counter system is naturally extensible... ...There's something to be said for telling the language exactly what you want it to do, rather than trusting that the default behavior, whatever it may be, will do what you want... especially when you're dealing with a funky concept like "incrementing text"...
Bow-ties are cool.
Last I checked, it is none of those *and* it used to be the powerhouse behind killer Web 3.0 sites like MySpace and FuckedCompany*.
*IIRC.
An often overlooked scripting language is Mumps (Massachusetts General Hospital Utility Multi-Programming System), developed in the late 1960's.
Mumps (also referred to as M) supports a multidimensional and hierarchical database facility implemented as string subscripted array references. It was widely used in clinical computing and remains to this day the basis of the U.S. Veterans Administration's computerized medical record system, the largest of its kind in the world.
Its main features are: (1) its tree-structured (multi-dimensional) database; and (2) its flexible string handling facilities which now including PCRE functions.
There are both compiler and interpreter versions available as open source/GPL packages. It supports many text processing functions, system shell integration, as well relational database access. There is also a compatible C++ library to integrate the tree structured data base access into C++ programs. The Mumps/II native hierarchical array database may range in size up to 256 terabytes.
The package is available from:
http://www.cs.uni.edu/~okane
(see download link).
Kevin O'Kane http://www.cs.uni.edu/~okane/
Only Perl can read perl. You can forget about a fancy IDE with intellisense when you use perl.
PHP support means generating a wordlist that would wrap from coast to coast.
Ruby? Dunno.. but like Perl and PHP since it is dynamically typed it is harder to write an IDE for it. Haven't seen what Microsoft has done for it yet.
Javascript? Really depends on how well you can manage keeping your Javascript code in sync with your server code.
CPAN is the best part and the worst part of Perl.
Ever tried to write a meta package in whatever build system you use (FreeBSD Ports /gentoo whatever/ RPM)? Especially when the ports tree doesn't have all the CPAN modules?
Talk about a mess! That said, you only really have to do it once and then maintain your meta package.
Lua's said to be the number 1 scripting language for making games. Surely it deserves a mention.
Poor Lua never gets the respect it deserves.
Ruby example:
/\w+ \w+ \w+/
>> puts 'yep' if 'I like cats' =~
yep
or:
>> "I like cats".match(/\w+ \w+ (\w+)$/).captures
=> ["cats"]
You can create a union of two regexp:
>> Regexp.union(/I like \w+/,/sandwhiches$/)
=> -mix:I like w-mix:sandwhiches
Also they are Perl compatible.
So, no interview with Mike Cowlishaw, the developer of Rexx? Ignoring Rexx, Object Rexx and NetRexx?
I thought this was about scripting languages.
And NASA alone having MILLIONS of lines of Rexx code.
I've coded Rexx on IBM CP/CMS, Amiga, and Linux.
And the Amiga version is better than what is available for Linux.
Rexx; everything is a string, and math is decimal based, with 15 digits of precision.
I was very disappointed Lua was not included. It is one of the most popular scripting languages for embedding in applications, especially Games. People forget that a scripting language is primarily for extending the functionality of an application. Also, while Python and Ruby can be hacked for this purpose, they are very poor choices for scripting languages and should probably _not_ be included in the list.
This part from the old TFA cought my eye:
When reading this, I immediately thought of ARexx (and now also show my fondness of the Amiga and somewhat show my age, now git of my lawn!). The use of scripting languages as glue between different programs is somewhat forgotten these days I think. Also forgotten is the easy witch with you could embed ARexx, and how extremely easy it was to interface with programs using ARexx.
I think these aspects could be better developed.
/ The Arrow
"How lovely you are. So lovely in my straightjacket..." - Nny
It's a game sailors play.
You need a few drinking buddies, a long banquet table with a long, heavy tablecloth, and one prostitute.
The idea is to sit at the table while the hooker(who is under the table) will chose one of the men at random and begin sucking his dick.
The object of the game is to receive fellatio and come without making it known to the other guys. For example, if the hooker chooses you and you squirm or grunt whilst having your dick sucked, and one of the guys calls you on it, then you lose and you have to buy the next round of beers before the hooker chooses another man at random.
It's a game GNU/Linux users play.
You need a few drinking buddies, a long banquet table with a long, heavy tablecloth, and one Vista lappy.
The idea is to sit at the table while the Windows box with Crysis (which is under the table) is passed to one of the men at random and they begin playing.
The object of the game is to play the game and win without making it known to the other guys. For example, if the game chooses you and you squirm or grunt whilst playing Crysis and one of the guys calls you on it, then you lose and you have to buy the next round of beers before the game chooses another man at random.
I prefer the hooker one.
Adobe ColdFusion MX 8?
It's probably become one of the most powerful and flexible scripting language platform around. I've built large-scale, object-oriented, flexible systems in it with MVC frameworks. It has a 3 to 4 times lower development time frame to market, offers almost every power of raw JAVA, and removes a large part of the complexity of coding in regular Java (for those that don't realize, CF is really just a highly optimized layer on top of JAVA and the JVM now). And, if all the pre-built functionality doesn't cut it, you can drop right down to the JAVA classes and use them directly.
I got into internet technologies right from the beginning in 1994. I was a high-end consultant for 10+ years engineering and building large-scale products from the ground up, and for the last 3 years the Lead Architect of a large, San Francisco based software company managing its core engineering team and mentoring 200 in-house JAVA developers. I've successfully engineered products that have generated millions in revenue in just about everything out there; ASP, VB/C#.NET, PHP, mod_perl, JAVA, and CFMX. I'd choose to build something in CFMX any day versus the others at CF's current stage of maturity. It has the perfect balance between features, power, ease of use, and development time frame at this point. It suffers from its reputation from years past IMHO. Combine it with Flex 3 and/or AIR (Web 2.0 platforms) and you've got a serious winner.
Note: no... I do not work for Adobe and no associate whatsoever.
People, wake up. WTF that dude in article is talking about? Perl? For infrastructure? Ideal database manipulation?.. Huh?! How come?.. Anyone Perl pro: show me how you do array of dictionaries of arrays of dictionaries and how you do compare these structures and manipulate. Then I will show you how to do it in Python and/or Ruby. And everybody will decide what is ACTUALLY ideal for database manipulation, especially you have 5 minutes to do the job.
Perl is constantly dying step by step, leaving its place to more mature and more EASY languages. Perl has no much future: Perl 6 never released, only blablabla and talks. About Perl 6 just talking about literally for years. In compare, Python 3K is already final beta and soon will be release. Here is a chart, showing that Python is more used world-wide than Perl, afterall...
Ruby also has its remarkable spin...
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Am I missing something?
According to the coverity report http://scan.coverity.com/rung2.html Perl does not have the lowest defect rate.
...circle jerk!
But even perl chokes badly on "invalid" chars, and there's no way that I could find to just replace them with question marks or just pass them around unchanged. I work with terabytes of text and this text comes from the web, blogs and other sources. It is pretty much guaranteed to have broken chars in it, and I don't want to throw away a line of text just because one character is not an "approved" Unicode code point.
Python is pretty busted - I gave up on it after trying to write a scraper in it (using BeautifulSoup). I'd need to fix _standard libraries_ to make it not crash every now and then, and I'm spoiled - I expect the libraries that come in the RPM to just work. Ruby doesn't even know what this Unicode thing is.
http://www.scala-lang.org/node/166
not to mention type-inference
Obligatory fix-it-yourself comment. Riposte?
... and that since it's not rigourous enough we should be using other languages like Scala. If Java's type system IS enough (but incomplete) then the argument goes why should dynamically typed languages be singled out for not being robust enough on bigger code bases? I'm paraphrasing from the Static Typing's Paper Tigers section of Steve Yegge's Rhino's and Tigers blog post though.
I doubt that dynamic languages slowness would be solved (today without new research) if they switched to static typing though... Surely dynamic languages could target VMs like the JVM or CLR and that may ultimately lead them to running just as fast as Java or C#? If that were the case the speed problem would not be down to their dynamic nature but perhaps something like the lack of extensive JITing...
While Slashdot might not be the place that company movers and shakers read, it's interesting to follow your replies and justifications for the article here (and of course it has encouraged me to read the article itself).
LUA. Just check out how many major apps and games have selected Lua as their scripting language due to lightweight runtime, ease of integration and relative speed.
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.slashdot.org Errors found while checking this document as HTML5!
Played a bit with it, but gave it up after all hoops I had to jump through with signing MY OWN FUCKING CODE.
Javascript is a moderately painful language, yet we all have to use it. The object model is ill-designed; borrowing from Self was a mistake.
Why? After experimenting and then writing real applications in it, I really quite like the object model, and find the language most expressive and flexible thing I've really written anything in (C, C++, Java, Perl, PHP), so much so that I'm fearing the introduction of classes, even though it has some good reasons, is going to turn the language into a middle-morass ghetto like Java.
Too much use is made of "eval"
An over-used feature in a language is one of the easiest problems to address.
Because of this, Javascript has scaling problems.
Scoping and namespace collision issues are real, but there are pretty ready techniques for dealing with them. Scaling really only becomes a problem when you need to bring together two codebases written by programmers who didn't use those techniques.
There are definitely other security and other implementation issues, but increasingly, I'm finding that unless I need rich media features for which something else is more appropriate, I actually *prefer* working in Javascript.
Tweet, tweet.