News for hackers. Stuff that matters.
Re:The struggle with Rust by the_af on Tuesday January 24, 2017 @08:23AM (#13471083)
> 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.

Re:The struggle with Rust by rubber_duck on Tuesday January 24, 2017 @08:27AM (#13471110)
Yes 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.
Re:The struggle with Rust by the_af on Tuesday January 24, 2017 @09:39AM (#13471602)
That'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.
Re:The struggle with Rust by rubber_duck on Tuesday January 24, 2017 @10:09AM (#13471873)
But 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.
Re:The struggle with Rust by the_af on Tuesday January 24, 2017 @10:40AM (#13472180)
Safety 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.

Re:The struggle with Rust by cillian64 on Tuesday January 24, 2017 @08:35AM (#13471148)
C++ 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.
Re:The struggle with Rust by rubber_duck on Tuesday January 24, 2017 @08:45AM (#13471206)
>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.

Re:The struggle with Rust by tonyedgecombe on Tuesday January 24, 2017 @08:55AM (#13471265)
I 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++.
Re:The struggle with Rust by Bartweiss on Tuesday January 24, 2017 @10:21AM (#13472000)
From 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.

Re:The struggle with Rust by yellowapple on Tuesday January 24, 2017 @11:48AM (#13472994)
In particular, the lack of pointers in Java would probably annoy the article author as much as Rust does.
Re:The struggle with Rust by AstralStorm on Wednesday January 25, 2017 @03:50AM (#13479834)
Personally (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.

Re:The struggle with Rust by camus2 on Tuesday January 24, 2017 @09:03AM (#13471321)
> 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.

Re:The struggle with Rust by the_af on Tuesday January 24, 2017 @09:35AM (#13471575)
That'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.
Re:The struggle with Rust by camus2 on Tuesday January 24, 2017 @09:39AM (#13471604)
> 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.

Re:The struggle with Rust by the_af on Tuesday January 24, 2017 @10:18AM (#13471963)
C++ 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.

Re:The struggle with Rust by camus2 on Tuesday January 24, 2017 @07:08PM (#13477100)
> 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.

Re:The struggle with Rust by AsyncAwait on Tuesday January 24, 2017 @12:12PM (#13473265)
I think that OP's point is that Haskell or Rust introduce enough of a different paradigm that it is worth thinking about them anew, rather than trying to map your old programming language knowledge to Rust or Haskell directly.
Re:The struggle with Rust by eptcyka on Tuesday January 24, 2017 @08:37PM (#13477659)
Then why even bother learning a new language if you have to deliver something fast and you know one already?