Hacker News new | ask | show | jobs
by soc88 5203 days ago
I think many people share some concerns about macros, especially the need for good error messages. A far as I know Scala's language designers have been against including macros for a long time. So the proposal for macros has to be damn good if they change their opinion.

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.

2 comments

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?
I look forward to improved docs in the standard library when that happens.