Hacker News new | ask | show | jobs
by gary17the 1473 days ago
I don't know OCaml, so I cannot compare the two, but, generally speaking, Rust does not require functional programming, or using only immutable data structures, or using cloning, or using copy-on-write semantics (which have to properly handle the reference-type-inside-a-value-type problem), but works through no-copy data ownership transfer, multiple immutable references, or only a single mutable reference to data at a time, all checked across threads at compile-time. Finally, Rust is not garbage-collected, so it can be used in resource-critical environments, such as embedded, metered serverless, Linux kernel drivers, etc. If you're interested, have a look at the "A Firehose of Rust, for busy people who know some C++"[1] video.

[1] https://www.youtube.com/watch?v=FSyfZVuD32Y

1 comments

Neither does OCaml.

"Unix system programming in OCaml",

https://ocaml.github.io/ocamlunix

Ever heard of MirageOS, and are you aware that DockerDesktop TCP/IP stack uses parts of it?

https://mirage.io/