Why would anyone want to do that? Well, here's a few ideas:
- to do client side development using a modern statically typed language,
- to reuse server-side code on the client,
- to run Ceylon code on node, or
- for easy experimentation in a REPL.
Some things that made this job especially easy:
- Ceylon has well-defined semantics defined in a written specification. This is absolutely key for any kind of multi-platform-oriented language.
- The Ceylon compiler has a layered architecture with a well-defined API between the parser/typechecker and the back end. Indeed, the two projects are developed by completely independent teams. Therefore, adding a new backend is an easy task.
special kind of function. Un-
foo.bar.baz from version
1.0 of a module named
foo.bar like this:
Now it's easy to instantiate a class named
call its methods and attributes:
var counter = foobarbaz.Counter(); counter.inc(); console.log(counter.getCount());