Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

17 JavaScript tools breathing new life into old code

Peter Wayner | May 5, 2015
Computer languages have a strange shelf life. The most popular among them experience explosive growth driven by herding behavior akin to that of the fashion industry. But when they fade from the spotlight, something odd happens. Instead of disappearing like a pop song or parachute pants, they live on and on and on and on. The impetus behind this quasi-immortality? It's often cheaper to maintain old code than to rewrite it in the latest, trendiest language.

Cobol

The language that dominated the mainframe world and still commands 553 jobs on Dice.com at this writing can also run in the world of JavaScript. CobolScript is a Node.js package that will run many parts of standard Cobol alongside JavaScript code written for the Node.js server.

The developer calls it a work in progress and lists a number of parts that don't function yet, but there are enough juicy examples to show promise, like the ability to enable dusty Cobol code to suck data from MySQL and spit out HTML to power a modern Web app.

Lisp

For many people who learned to program from reading Hal Ableson and Gerry Sussman's "Structure and Interpretation of Computer Programs," there's no better way to spend an afternoon than counting parentheses and making sure they balance. Lisp and its various dialects continue to hold a special place in the hearts of those who learned them early, and many of their structural ideas are now part of the foundations of a number of modern languages, including JavaScript. The syntax may be gone, but the flexible architecture remains.

There are more than a dozen options for enlivening your Lisp code via JavaScript, and they vary in approach from the traditional to the experimental. EdgeLisp, for instance, offers many of Lisp's standard constructs, and its development team promises that EdgeLisp will "feel familiar to Common Lisp programmers." Parenscript offers "the full power of Lisp macros" and much more from the world of Common Lisp. If you like the Lisp-1 dialect, then Ralph is another option.

Fans of Scheme will find a number of implementations like BiwaScript, Moby Scheme, and nconc.

There are also plenty of more experimental syntaxes that promise all of the fun of thinking in Lisp with a slightly different format. LispyScript mixes in some of the power of macros with parentheses. Oppo is an option that introduces itself with the following claim: "If JavaScript is Lisp in C's clothing, then Oppo is Lisp in Lisp's clothing, with C's pajamas."

Smalltalk

While it's common knowledge that Apple and Microsoft borrowed heavily from the ideas circulating at Xerox PARC, it is often forgotten that the Xerox PARC researchers also revolutionized programming languages. When most programmers were fussing with GOTOs and subroutines, Smalltalk was one of the first languages to bring object-oriented options to the world.

Clamato, for instance, converts many of the easy Smalltalk constructs into the parts of JavaScript that are similar (and ultimately stolen). Not everything is there, but the developers behind Clamato throw in a connection to jQuery and other DOM manipulation tools to make up for it, so you can build Web apps.

 

Previous Page  1  2  3  Next Page 

Sign up for CIO Asia eNewsletters.