New JavaScript-based language brings the speed

25.08.2015
The list of languages compiling to JavaScript is about to welcome newcomer Imba, a speedy language for the Web.

Currently in a late-beta stage, Imba is the brainchild of developer Sindre Aarsaether, of Oslo, who sees tags and selectors in the language as a key differentiator. "By implementing tags the way we do in Imba, there is very little need for complex frameworks, and view-related code becomes very concise and very performant," Aarsaether said in an email.

Imba is so fast, he said, that it enables a new way of building single-page applications. "In applications with a lot of state, most frameworks try to tackle data-binding in different ways. In Imba, you can basically re-render the whole application on every frame, and in return, you never need to think about tracking any changes, binding any listeners for rendering. It vastly simplifies how you write apps."

Language-level support is offered for defining, extending, instantiating, subclassing and rendering DOM nodes. "This is by far the most important part of Imba," said Aarsaether. "Without this, I really would not have recommended Imba for any serious work, as it would be much smarter to go for a more mature language with a larger community.  The performance we achieve makes it."

Although Imba ultimately compiles down to JavaScript, the level of performance would be very difficult to achieve without a compilation step, he said. "We cache DOM nodes for reuse in a way that would be very cumbersome and impractical if you were to do it by hand. It is much faster than regular virtual DOM implementations."

Does the world really need another language Aarsaether sees Imba filling a hole. "We always need to experiment with new ideas, and we should always strive to improve how we build software. If a new language is not needed, it will not gain any adoption. If it has some novel ideas, it might just inspire other more mature languages to evolve. I really think that DOM tags deserve to be a first-class citizen, like numbers, strings, arrays, and other objects," he said. "And after using Imba in my own professional work for several years, I really think we have something special on our hands. At the very least there are some interesting ideas here that other languages and frameworks might pick up on."

Aarsaether describes Imba as being reasonably stable and in use for several business applications. Documentation, however, remains in a pre-alpha stage, and Aarsaether does not recommend using the language for any important project until documentation is improved.

(www.infoworld.com)

Paul Krill

Zur Startseite