Re:Curry On Prague 2015: Academia and industry need to have ...
by skybrian on Thursday February 05, 2015 @02:55PM
(#9005545)
Scala isn't really designed for embedding but something else might work. Perhaps a little language specifically designed for embedding. Some existing little languages include regexps and SQL, but perhaps there's room for portable pure functions.
But you do have to decide how data gets passed in and out.
In Java, you represent a missing value with null, but well-typed Scala should never encounter a null. Java will also regularly raise exceptions, but Scala usually prefers wrapping values that may fail with Either. There's no clear way to automatically bridge the gap, which means falling back to Java is always going to be a necessary evil, rather than something that should be encouraged.