News for hackers. Stuff that matters.
Re:What I wish I knew when learning OCaml (2018) by Serow225 on Tuesday May 03, 2022 @11:17AM (#31249371)
that’s pretty much F# :)
Re:What I wish I knew when learning OCaml (2018) by mumblemumble on Tuesday May 03, 2022 @12:29PM (#31250245)
As a long-time F# user and current Rust learner, I would say the similarities are mostly cosmetic.

First and foremost, F# is functional-first, while Rust isn't really functional. Rust takes some useful features from functional languages, to be sure, but the overall paradigm is more procedural. A lot of key functional idioms and design patterns don't really fly in Rust because it's difficult-to-impossible to make them play nice with its memory management model.

Rust has traits, but not OOP. F# has OOP but not traits or typeclasses.

F# is immutable by default, and discourages mutability. Rust is immutable by default, but embraces (and tames) mutability.

Re:What I wish I knew when learning OCaml (2018) by throwaway894345 on Tuesday May 03, 2022 @02:04PM (#31251424)
If F# had static, native compilation by default, a closer Cargo analog, and eschewed the OO stuff (probably mostly just there for C# interop?) and the OCaml syntax.