Hacker News new | ask | show | jobs
by sam-mueller 4713 days ago
"There's almost no excuse not to use Scala if you're deploying on the JVM."

There's a good reason, actually - library maturity, especially when trying to get data in and out. Try and do some inner joins with typesafe slick and you'll know what I mean when you see the SQL it generates.

Or try and use Play Framework's json de/serialization, and be prepared to punch your monitor in the face.

I think these critical libraries can get there, but the lack of resources on these projects has me thinking we'll be waiting awhile.

3 comments

I've definitely felt the pain of Play JSON serialization, it's infuriating.

There's a macro that will take an entire object, generate the converter and do the conversion in one line of code, but it won't let you choose which fields not to send. So your list of users get their password hashes sent too.

For deserialization I just do it manually by pulling the fields out of the objects sent.

I built ScalaQuery 0.10 against Scala 2.10.2, not touching Slick until the library matures.

Think Scala Pickling by Sara Miller at TypeSafe looks excellent for serialization needs.

Find out more about scala/pickling at: http://lampwww.epfl.ch/~hmiller/pickling/

(It's Heather Miller from EPFL, though.)

For libraries: if push comes to shove, you can just use Java libraries. The bridging is extremely easy (invisible in most cases"