javacoffee
Coffeescript-like syntax for writing Java code.
npm install javacoffee -g
Please don't install yet. This is still in development!!!
Examples
Fibonacci
class Fibonacci # Print out the Fibonacci sequence for values < 50 main lo = hi = 1 println lo while hi < 50 print hi hi = lo + hi lo = hi - lo
converts to
Point
class Point +double x, y +&origin = Point 0 0 Point @x @y +clear @x = @y = 0 +distance(Point that):double xDiff = x - that.x yDiff = y - that.y Math.sqrt xDiff^2 + yDiff^2
converts to
How to compile
javacoffee file.jc
-> file.class
How to develop
gulp
running
Install and keep npm installgulp
Test with the following:
node ./bin/javacoffee myFile.jc
Run tests
npm test
Filetype: .jc