3 ms·
I suggest you try a functional language before driving into Rust.
by v8dev123 5y ago
I suggest you try a functional language before driving into Rust.
- adenozine 5y agoFirst off, your account is just C++ spam. So, off the bat, I've dismissed the notion of taking you seriously. I've implemented a basic ML variant before, and maybe half a dozen different lisps. Rust is only BARELY functional. A C++ guy ought to know better! Believe me, I'm not interested in Rust for Rust's sake. If there were a GNU implementation, I could see writing code generators for Rust a little less cumbersome than trying to target C or LLVM IR or Wasm. Realistically, I see Zig winning the fight that Rust is trying to fight, and C++'s headaches being replaced with Rust's headaches.
- v8dev123 5y agoI don't spam C++ and I comment on C++. There is no fight. There is made-up flame-war. Every war happen at HN and Reddit's Echochamber not at Real World. Every languages has headaches. You won't find a perfect language ever. You can't do serious Rust if you don't understand functional aspects. I know C++, Haskell and Rust. Like many says Rust is a functional language disguised as imperative. There were case studies on Rust where a one with Haskell background more like to learn it faster than a one with C++ background. The Rust book don't show you the functional parts at beginning to build your intuition but once you drive deeper you will realize what I meant. https://ceronman.com/2020/09/17/is-rust-a-functional-language-in-disguise/ https://ceronman.com/2020/09/17/is-rust-a-functional-languag...
- spoiler 5y agoIn my (limited) experience with people who tried to learn Rust with a predominantly C++ background mostly struggle with trying to shoehorn some OOP design, when the language has other idioms better auite to it. Rust does have a lot of nice ideas borrowed (hehe) from functional programming, but it's far from being FP! On a tangent: you're comment about learning a FP before learning Rust is great advice, but not for the reasons you initially intended perhaps. Learning FP in general is great, since it teaches you a different way of thinking from the "classical" way programmers think. So, it's great to learn FP for anyone, regardless of whether it's for Rust's sake (it will help a bit with reasoning about some Rust concepts and idioms, though), or not.
- v8dev123 5y agoGraydon Hoare is a OCaml developer. Graydon Hoare mentions Rust as linear ML in C++ clothing. https://twitter.com/graydon_pub/status/1154476823557754880 https://twitter.com/graydon_pub/status/1154476823557754880 I empathized the can't deny relationship between Rust and FP. It doesn't means Rust is a pure FP language. I always said same thing about C++ templates too.
- deleted 5y ago[deleted]