Re:Scala Macros: “Oh God Why?”
by anonymoushn on Thursday March 15, 2012 @09:47PM
(#3711546)
As far as I can tell, value classes provide the performance of primitives with primitives. Is there a way to make a value class that contains more than one primitive, so that you could have semantics similar to those of a struct in C?
Re:Scala Macros: “Oh God Why?”
by thebluesky on Thursday March 15, 2012 @12:30PM
(#3709163)
I look forward to improved docs in the standard library when that happens.
Macros are supposed to be a replacement for writing compiler plugins in many cases (compare with Java annotation processing vs. Java compiler plugins). The API is easier and more straightforward, semantics are easier to understand and don't require separate setup step.
In the meantime work has of course not stopped:
- Syntax has been simplified and several confusing bits have been removed/deprecated (Octal literals, FP literals without digit after dot, ...).
- The jar size of the library has been reduced, while adding fixes and functionality.
- Value classes have been integrated, which provide the performance of primitives with user-defined classes.
- Inlining has been improved a lot.
- Compilation speed has been improved a lot.
- Some collection classes have been performance optimized and are now a lot faster (and sometimes faster than the Java implementation).
- Play 2.0 and Akka 2.0 have been released, both with huge amounts of documentation.
- Documentation has been improved.
- ...
My personal impression is that while Scala has roots in academia, solving real-world issues is the focus of the team.