Found on dzone, Nick Plante pointed out Charles Nutter's Mirah project on the 25th of November. Mirah is a Ruby-like syntax for java, and compiles directly to Java bytecode. It supports a clean syntax, closures, and some other features, and Charles says you can do a lot of what people love about Ruby without doing anything more complicated than what Java does.
Types are inferred, so declaring variables is very nice; annotations are supported, void methods return self (or "this") so it gives you some interesting constructs, and of course the Java API is supported. Mirah has no finals, and doesn't need them.
Mirah's feature page describes Mirah like this:
"In general, Mirah could be seen as a “Ruby with static types�, though Mirah is not Ruby. It does not share Ruby’s type system, core classes, standard library, or even execution model, since none of these things are imposed upon Mirah programs by the Mirah language."
It's great to see more languages for the JVM. Which ones do you use, and where? Anyone want to volunteer examples of where JVM-based languages that aren't Java are being used for production apps?
-
Mirah - a Ruby-like syntax for Java (4 messages)
- Posted by: Richard Mayhew
- Posted on: November 29 2010 05:05 EST
Threaded Messages (4)
- closures by Ron Piterman on November 29 2010 12:04 EST
- Another wheel. by Victor Jan on November 29 2010 14:40 EST
- Scala is not a silver bullet by Undisclosed Undisclosed on November 30 2010 09:42 EST
- Re: by Philip Green on October 21 2011 11:24 EDT
-
closures[ Go to top ]
- Posted by: Ron Piterman
- Posted on: November 29 2010 12:04 EST
- in response to Richard Mayhew
Great thing - don't know why I would like to use Ruby Syntax to compile to Java Bytecode, but sure its cool - but one thing that comes in mind is closures, so what about them, being a great feature the ruby language has which java is missing?
-
Another wheel.[ Go to top ]
- Posted by: Victor Jan
- Posted on: November 29 2010 14:40 EST
- in response to Richard Mayhew
When Scala provide a perfect combination of OO and FP, I am not sure whehter we need so many other wheels. Of course, if you like Ruby syntax, that is another story.
-
Scala is not a silver bullet[ Go to top ]
- Posted by: Undisclosed Undisclosed
- Posted on: November 30 2010 09:42 EST
- in response to Victor Jan
Scala programs still require rather large runtime library, while Mirah compile to pure bytecode and needs only JVM and no runtime. This is especially handy on devices like Android.
-
Re:[ Go to top ]
- Posted by: Philip Green
- Posted on: October 21 2011 11:24 EDT
- in response to Richard Mayhew
Frequently the Java syntax is mostly derived from C++. Though C++ is dissimilar and contrast it coalesce the syntax for generic, structured and object-oriented programming. Java is developed from the base as an object oriented language.
Bandages