The Java prototype

Why Java?

 

...for pragmatic reasons:

  • "web-startable..."
  • mature, with libraries for everything
  • widely known => understandable/maintainable
  • cross platform
  • productive tools

 

But it's far from perfect as well. I didn't noticed it before but I really miss passing functions around (aka higher order funtctions), algebraic data types, missing high level data structures and pattern matching. But of course Haskell had a lot of disadventages as well ...i think Java stays more readable than Haskell.

 

If I had to redo it again, I think I would pick C++ directly ...it may look less productive ...but at least you've your hands free to do what you want and I think in the end it pays of. It is more error prone, less productive but at least it doen't come in your way.

 

Anyway, here is the java prototype, not written elegantly since it's a throw away one. Yet, it should be clear enough for you to find your way in it. It currently only parses the source code in a parse tree. It supports indentation, functions, nested definitions and so on. Basically the minimal core of the Arplan language minus the data types.

 

java prototype - parsing only
...there are a few files to exclude from the path before compiling
java_src.zip
Compressed Archive in ZIP Format 24.2 KB