News for hackers. Stuff that matters.
Re:Scala Native by densh on Wednesday May 11, 2016 @06:43PM (#11679975)
The goal is to be as "true" as possible by default with extra flags to trade some exact semantic aspects for performance. E.g. overflow semantics, bounds checks, null safety etc.

Apart from the base language we'll also introduce some language/library extensions to make lower-level programming that is going to be limited Scala Native "dialect" of Scala. E.g. pointers, structs, stack allocation, extern objects etc.

Re:Scala Native by airless_bar on Wednesday May 11, 2016 @06:53PM (#11680034)
Is there a difference between @extern and @native?

I could have imagined that it would have been more compatible if Scala-JVM and Scala-Native used the same annotations (using JNI behind the scenes on the JVM).

Re:Scala Native by sjrd on Wednesday May 11, 2016 @09:44PM (#11680779)
I would explain the difference as: @native says please implement this Scala method of this Scala class in C, respecting all the JVM calling conventions and memory model. @extern says call this C function that never knew about Scala or the JVM, respecting all the C calling conventions and memory model.
Re:Scala Native by densh on Thursday May 12, 2016 @01:10PM (#11685056)
@native implies JNI-style definition to be available along the Scala method definition. @extern lets you call straight to C code without any additional ceremony, all you need is a single forward declaration.