4 ms·
You're doing the comparison from the bottom-up, perhaps like how a programming language connoisseur would look at them -- how the linguistic features of C++ and
by pron 6y ago
You're doing the comparison from the bottom-up, perhaps like how a programming language connoisseur would look at them -- how the linguistic features of C++ and Rust were constructed -- while I'm looking at them from the top down, how just a programmer who doesn't particularly care about PL theory would: what is their design philosophy? Both are low-level languages (so, low-abstraction), which try hard through various syntactical techniques and a nice dose of implicitness to make code, once written, appear high-level on the page. I find those two languages almost indistinguishable in terms of "feel." It doesn't feel like Python, it doesn't feel like Java or Go, and it doesn't feel like C; it feels like C++.
- jgilias 6y agoI do agree that Rust 'feels' more like C++ than Python or Java. But then, from my limited experience with dabbling into Haskell, to me it feels more like Haskell than C++. In Rust, from the language perspective, I have to deal with things like these: - Doing Option<T> -> Option<U> - At what point do I do Option<T> -> Result<T> - Should I transpose Vec<Option<T>> to Option<Vec<T>> now or later? - Often reaching for algebraic data types - How to map over this to collect it into what I need - Ah, it needs to implement Hash, Eq, PartialEq ... SomeTrait to make it work the way I want - Pattern matching all over the place All of which to me mentally feels more like something along the lines of F#, OCaml or Haskell than C++ that 'normal people write'.