3 ms·
I think you're making the pure=functional mistake like I was. Rust is almost identical to OCaml in terms of functional style. Which is no big surprise given tha
by IshKebab 2y ago
I think you're making the pure=functional mistake like I was. Rust is almost identical to OCaml in terms of functional style. Which is no big surprise given that it was heavily inspired by it (and the first compiler was implemented in it). I think the only major difference is the lack of currying.(which IMO is an elegant-looking anti-feature).
> People complain all the time about Rust syntax looking cryptic and difficult to read.
They're talking about all the borrowing, lifetime and generics syntax. Not the basic blocks and semicolons.
- trealira 2y agoI think we just define functional programming differently. How do you define it? Also, I just noticed this part again: > Honestly the hardest thing learning OCaml was figuring out where to put the brackets and semicolons. I am 100% serious. Unironically, I'd recommend Haskell, or another programming language with similar whitespace-sensitive syntax. I'm more familiar with Haskell than OCaml (though inexperienced in both), and the semicolons and other delimiters actually got me as well. > They're talking about all the borrowing, lifetime and generics syntax. Not the basic blocks and semicolons. That's half the syntax to get confused about. But, ignoring that, people also get confused by the implicit returns at the ends of blocks.