What features of Scala cannot be translated to Java?

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2010-11-29T14:00:07Z Indexed on 2011/01/17 4:53 UTC
Read the original article Hit count: 197

Filed under:
|
|

The Scala compiler compiles direct to Java byte code (or .NET CIL). Some of the features of Scala could be re-done in Java straightforwardly (e.g. simple for comprehensions, classes, translating anonymous/inner functionc etc). What are the features that cannot be translated that way?

That is presumably mostly of academic interest. More usefully, perhaps, what are the key features or idioms of Scala that YOU use that cannot be easily represented in Java?

Are there any the other way about? Things that can be done straightforwardly in Java that have no straightforward equivalent in Scala? Idioms in Java that don't translate?

© Stack Overflow or respective owner

Related posts about java

Related posts about scala