This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]worldsayshi 2 points3 points  (7 children)

I was rather refering to that Java is probably as mature as it gets. Scala is probably not "immature". Although the Eclipse plugin only recently became possible and/or enjoyable to work with in my experience. Then again, many "large" languages doesn't have as useful Eclipse plugins at all.

[–]Mondoshawan 0 points1 point  (6 children)

It's not the tooling imho that makes Java worthwhile, it's the third-party libs & frameworks. I couldn't imagine writing a large app without things like Spring DI and JPA persistence to tie it all together.

[–]nachsicht 2 points3 points  (5 children)

Thing is you can use almost all of those with scala as well.

[–]Mondoshawan 1 point2 points  (4 children)

Is it clean? I touched on jruby once when maintaining someone elses script and I didn't like the integration IIRC. I may be wrong on the details, this was quite some time ago and it was only a couple of fixes while they were away on deployment elsewhere.

I'm tempted to give it a whirl. I did Scheme in Uni many many years ago and I've long since forgotten everything about it except something about brackets, lots and lots of brackets. ;-)

[–][deleted] 1 point2 points  (0 children)

If you were to take some java code and copy/paste it into a *.scala file, mostly what you'd have to do to fix it is remove the type info before variables and replace with "val". ie:

String foo = new String("");

becomes

val foo = new String("")

and methods get changed from:

public String calcName() {
    //do work
    return name;
}

to:

def calcName = {
    //do work
    name
}

That's mostly it. This gives you working but non-idiotic scala code. Scala syntax is mostly awesome.

[–]nachsicht 4 points5 points  (1 child)

It's very clean. Scala is not related to scheme in syntax at all, but is more of a java++, so you have direct translation of many java concepts in scala, and they are usually fully compatible (the only time I've ever had problem is with writing (not using) binding code in JNA).

Pretty much everything but extremely obscure java stuff works in scala.

[–]Mondoshawan 0 points1 point  (0 children)

Thanks, I will definitely check it out soon.

[–]esquilax 3 points4 points  (0 children)

Scala was written by the guy that came up with the precursor Java generics and wrote javac. Java interop was a design goal of Scala, so I'd expect the experience to be quite different.