5 ms·
> You just need to meditate deeply on category theory and draw direction graphs to become one with types and all would be revealed to you. In order to just use
by the_af 10y ago
> You just need to meditate deeply on category theory and draw direction graphs to become one with types and all would be revealed to you.
In order to just use Haskell you don't need to meditate about category theory at all.
Some things do require months -- or even years -- of studying. Like, for example, C++, Java or whatever was your first programming language. There is absolutely no getting around that.
- rubber_duck 10y agoYes but going from one to the other is relatively straightforward and possible in small steps of progression - Rust forces you to deal with a lot of things up front which is why people complain. eg. if you're a C++ developer you'll pick up Java very fast, it will take a while to be super productive but you can start working really fast.
- cillian64 10y agoC++ and Java are a bad example as they are unusually similar. Consider moving between C++, Python, and Javascript: on that scale, Rust doesn't seem so far out.
- rubber_duck 10y ago>Consider moving between C++, Python, and Javascript I think those will be trivial in that direction, harder in other - but that's not even relevant. I think if Rust aims to occupy C++ domain then it needs to be very easy to get C++ developers on board - and from what I've seen so far it's not quite the case. I'm not sure what can be done about it tho - maybe emphasize unsafe is not a dirty word but a valid approach when doing low level data structure stuff like OP ? Create an unsafe version -> refactor to safe as you're sure it does what you expect and you learn more about borrow checker instead of having to absorb it all at once.
- tonyedgecombe 10y agoI doubt moving from Java to C++ would be that trivial, Java is a comparatively safe language without many of the issues that will trip you up in C++.
- Bartweiss 10y agoFrom personal experience, it's not that bad. C++ is "Java plus you need to worry about these other things", and it pays off in power and speed. They're not so similar in safety/scope terms, but the structure and design have enough in common that you get plenty of spare brainpower to worry about managing C++. It was, for instance, a way more natural transition than "Java and C++ to OCaml". Less educational, but as usual that trades against easy.
- yellowapple 10y agoIn particular, the lack of pointers in Java would probably annoy the article author as much as Rust does.
- AstralStorm 10y agoPersonally (not the author) I am more annoyed by the gutted single inheritance no traits type system. You have numeric pointers into arrays, they're called indices.
- the_af 10y agoThat's because a lot of things (let's not debate exactly how many here) translate well between C++ and Java. But my point wasn't about going between relatively similar languages; it was about learning something radically different for the first time, like it was when you learned your first programming language.
- rubber_duck 10y agoBut that's not going to work in practice - there are many skilled C++ devs and C++ has many ingrained legacy issues which another systems programming language could solve - but the bridge between that language and C++ must exist for this to happen. Like in the post, OP is a competent programmer - he can solve his problem in C++ - why would he invest months in to Rust to do the same thing ? If your answer is safety then OK that will matter to some but a lot of people don't care enough about it to pay the cost of switching.
- the_af 10y agoSafety and correctness are big deals. I get that for many people they aren't a high priority. Such is life. If someone thinks they won't gain anything by going from C++ to Rust, then no effort to learn it will be worth it. Obviously the Rust devs think there is a benefit.
- camus2 10y ago> or whatever was your first programming language. People who complain about how difficult rust is to learn certainly aren't learning rust as their first programming language.
- the_af 10y agoThat's my point. I think people complaining that Rust (or Haskell, or whichever paradigm shift) "takes too long to learn" have forgotten what it was to learn their first language. It took them long, because some things take long. Learning something different takes time, but it's easy to forget this once you have a couple of languages under your belt.
- camus2 10y ago> I think people complaining that Rust (or Haskell, or whichever paradigm shift) "takes too long to learn" have forgotten what it was to learn their first language Because they are required to be productive fast. A professional usually doesn't learn a new language just for the sake of it. If the language doesn't yield instant benefits then most people aren't going to bother learning it. If a steep learning curve is expected for rust then the language will never be popular around the people who could potentially make use of it, i.e. C or C++ developers.
- the_af 10y agoC++ has a pretty steep learning curve, yet people use it. Many things in tech are tradeoffs. Sometimes the additional tools a language brings to the table are worth the learning curve, sometimes they aren't. There are people in the industry for which FP (or Rust, or whatever) is worth it. For you it isn't. That's life.
- camus2 10y ago> C++ has a pretty steep learning curve, yet people use it. C++ has 30+ years of libraries, so does C. To even think you can compare Rust and C/C++ on that matter is not realistic.