Re:Lilith: x86-64 OS written in Crystal
by ernst_klim on Monday December 23, 2019 @03:57AM
(#21862324)
> Ocaml - the functional approach is not for everyone.
OCaml is pretty general purpose though, it has loops, objects, mutable state. libguestfs [1] and some other codebases (the compiler itself, btw) are written in a pretty imperative OCaml.
OCaml somewhat tries to be familiar for OOPs, but it _is_ first and foremost a functional language.
Personally, I am learning it now, and I think rather than it being a stepping stone between OOP and FP, it might as well be its own separate and hybrid paragdim; I find purer FP languages like Haskell much more intuitive than the mix of modules, objects, types and classes of OCaml.
Though do not get me wrong, OCaml is an amazing language. It just stands rather by itself.
Pardon my terrible english.
You can use Kotlin/Native [0]
or just plain Kotlin over Java with GraalVM which produces compact binaries.
[0] https://kotlinlang.org/docs/reference/native-overview.html
Swift - crystal throws exceptions, swift explodes...
Ocaml - the functional approach is not for everyone.
Rust - I like rust a lot. But sometimes I want to write something quick and I'm happy to sacrifice some memory and speed to not have to deal with the ownership issues.
Nim - the most comparable, I guess it's syntax preference at that point