Hacker News new | ask | show | jobs
by rwhaling 2488 days ago
I've been using Scala Native for two years now, and I find that it's C interop is state-of-the-art. The way I would pitch it is: Scala Native gives you the capabilities and performance of C, embedded in a Scala DSL.

In particular, pointer arithmetic and memory allocation feel really smooth, and struct syntax is getting reworked for the upcoming SN 0.4 release.

The affinity with C, and with systems programming in general, isn't something you necessarily get with Swift or OCaml to the same extent. And even Rust, although it is outstanding for some systems tasks, isn't 100% mature on concurrency and async use cases yet.

In contrast, Scala Native works really nicely for low-level concurrent programming - I'm writing a book about SN for Pragmatic at the moment [1], and the entire second half is about building up a fully concurrent backend service framework, from scratch, using C libraries like libuv and libcurl. We're also preparing to release an official libuv binding for Scala Native 0.4 [2]

1: https://pragprog.com/book/rwscala/modern-systems-programming...

2: https://github.com/scala-native/scala-native-loop