DJAX: Language on top of JavaScript

Hamish Friedlander has created djax, a language translator that takes code written in a javascript superset, and turns it into regular-ol' javascript. Javascript is a pretty cool language. djax makes it better. djax is a language. djax is javascript + all the things you wish javascript had. djax is a language translator. djax takes code […]

Hamish Friedlander has created djax, a language translator that takes code written in a javascript superset, and turns it into regular-ol' javascript.

Javascript is a pretty cool language. djax makes it better.

  • djax is a language. djax is javascript + all the things you wish javascript had.
  • djax is a language translator. djax takes code written in a javascript superset, and turns it into regular-ol' javascript that runs on PrettyMuchEverything.
  • djax is a bad backronym. djax is Dog Javascript And eXtensions. djax sounds a bit like ajax.

So what do you get?

  • Continuations (ish). Suspend a javascript function anywhere, and start it again later easily. Code synchronous ajax without locking the browser. sleep().
  • Threads. Execute long-running jobs in the background, while animations run smoothly in the foreground. No browser-lockups.
  • Generators. Iterate over anything. Easily.
  • ExtendedArguments. Variable-length arguments, keyword arguments, default values. Without the pain of the arguments property
  • Compatibility. Any javascript function should still work fine called from or translated through djax. Mochikit's self test passes all tests after translation.

Language extensions don't lend themselves to flashy demos. The threading demo here is interesting, but mostly for the coolness of the code.

Continue for more info....

Java, Secipt, Javaxcript, DJAX, Library