Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anything you can use in Java is available in Scala.


Although stuff that relies heavily on reflection and runtime code generation tends to be tricky. Class files generated by the scala compiler may look different from class files generated by javac and contain additional data (while of course still being valid java bytecode), and some tools rely on accidental details of the javac code generator. Someone mentioned JPA in this discussion. But most things just work.

Another issue is using scala code from java. As long as the code implements a plain java interface, everything is fine, but if you try to use something impemented with some of the features that java doesn't have, you will soon see some very stange mangled names. trö_%¿ is not a valid java fuction name, after all.


What about annotations?


You can use them too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: