News for hackers. Stuff that matters.
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.