Freitag, 24. Juli 2009

JScala - Using Java the Scala Way??

As the last entry has pointed out, I will now try to find out wether Scala is, despite is complexity, ever to be considered as an _imperative_ heir to the java throne. My next few entries will rotate around this issue.

If scala should be the heir, then at least the following points must be fullfilled:
- It must be easy enough of the everyday programmer: Easy to use, and its complexity hiding until needed.
- It must focus on imperative programming and using mainly the JDK. (I am looking at you, immutable and functional scala "List"!)
- Even though the syntax might differ, most usual constructs, like singletons should be easily to identify by someone who is at least familiar with the java way.
- No unreadable short expressions (another one in the face of functional p. Short is not always better)
- There must be a simple subset defined which helps doing imperative tasks and esp. patterns for imperative programming in java (seeing that most things, even loops require the functional way in the background)
- Good IDE support
- Support for Checkstyle and Code Formatting
- Good documentation
...

Many points on this list seem hard to achieve: esp.: how to hide the functional complexity at least partially from non-functionals. Seeing that even the for-lop requires some method calls and many things are not solved by keywords but rather by overloadable Operators (by its core just even more methods), there clearly must be some patterns which make it easy for the beginner.

Also, programmers more experienced in functional programming maybe should learn how to write their objects in a way in which not too much functional aspekts are leaked by their API. Honestly, I am sceptical wether such a step would even be possible with Scala, but maybe it is.

With the next articles, I will try very hard to find out wether it could ever be the new java for the masses. If it were, then I would predict that we have reached a new chapter of humanity. Functional Expressions, The possibility for any kind of DSLs and still pure OO just seems too good not at least to give it a try. A sceptical one, though ;-)

Keine Kommentare:

Kommentar veröffentlichen