4 ms·
Try out Scala. It's a superior substitute for Java in every possible way. And even if my last statement is hyperbole, you can still use Java in your scala proj
by yummyfajitas 14y ago
Try out Scala. It's a superior substitute for Java in every possible way.
And even if my last statement is hyperbole, you can still use Java in your scala project for the critical parts where scala doesn't do a good enough job. Sbt, the standard scala build tool typically builds you src/main/scala and src/main/java folders. Write scala in the scala folders, java in the java folders, they can easily refer to each other, it's all seamless.
- sek 14y agoThat is not true, you can program such an unmaintainable mess in Scala that is just not possible in Java. You don't have to implement every programming feature just because it exists. That makes Scala inferior in reality. In my opinion the reason why Scala will never be mainstream. There has to be a balance between features and simplicity.
- TylerE 14y agoThere will always be a market for a language without training wheels.
- thebluesky 14y agoFor a language that will "never be mainstream" it seems to be picking up steam pretty fast. We're very happy with it. Sensibly written Scala code is much easier to read than Java, and that's coming from someone who has been using Java for a long long time.
- notimetorelax 14y agoIt's funny my boss was thinking of trying Scala, but the more he learned about it the more he became disillusioned. I remember reading somewhere that although you might decide to limit use of Scala language facilities (as there are too many of them), you'll still have to deal with them when trying to understand how libraries work (for debugging purposes for example).
- thebluesky 14y agoFiguring our how core libraries such as the collections framework work is pretty easy if you get a good book like Scala for the Impatient.
- notimetorelax 14y agoIt's not only core libraries, all the available libraries that your project depends upon will one day or the other have to be debugged. I mean I had to debug Hibernate and it was a pain, I can't imagine debugging something written with advanced Scala features that I'm not very confident with.
- djb_hackernews 14y agoOnly problem is the scala community is teeny tiny, tool support isn't there (There isn't an IDE with a scala plugin that fully supports scala), pure scala libraries tend to be unreadable and lack any solid documentation (looking at you scalaz, lift, and dispatch), and I think most importantly the scala compiler is SLOW. I've written a bunch of production Scala code, and I'm glad to have gotten away from it. Obviously to each their own.
- jrabone 14y agoIntellij Idea + Maven seemed pretty good, last time I had to write production Scala. I couldn't get it working with the fast background compiler daemon, which would have really helped. Agreed on the readability though.
- yummyfajitas 14y agoI find scalaz quite readable, though admittedly I'm using Scala as an overcomplicated Haskell on the JVM rather than a superior Java. So my use pattern is mainly "which scalaz feature copies the haskell feature I want?" rather than "how can I use this lib to help me?" Haven't used lift or dispatch, so I'll take your word for it. As for a small community, it hasn't bothered me. I get to cheat and use all the java libs. Regarding compiler speed, I get the impression it's much worse on a mac than on linux (I use the latter, my colleagues use the former). On linux I've had little problem. I also tend to use `~ compile` in SBT. This will re-compile any time a file is modified, and notify you when an error occurs, so typically my code has already compiled by the time I actually want to run it. That's a really nice feature I wish I had in Haskell.
- thebluesky 14y agoThere isn't an IDE with a scala plugin that fully supports scala IntelliJ provides an excellent free scala plugin. What have you been using?
- djb_hackernews 14y agoI mainly used the Intellij scala plugin... It's code completion was incomplete and it identified syntax and type errors that weren't errors. This was on the latest intellij with the latest plugin.