Live data from Hacker News

How I went about learning Rust

eli.thegreenplace.net

271–280 of 303 posts

Re: How I went about learning Rust

#271
post #57

Earlier quoted context omitted.

I think rust is the new haskell. After spending 7 months learning it, I can say I really enjoy the language, but there's no job in it and in my opinion, they take academic decisions that make the language way more complex than it should. Also, the community is toxic. For example, generics in Go were criticized by some, praised by others. You have the feeling that you can freely share your opinion in the go community…

> Also, the community is toxic. I think "somewhat dogmatic" would be a more accurate description of the Rust community, IMO. For example, I recently had a discussion about `enum` being a poor choice for what Rust makes it to mean from a C/C++ developer's point of view (which are Rust's main "replacement target" languages). The closest I got someone to agreeing with me is a sentiment along these lines "well, `variant`…

FWIW, changing the keyword and nomenclature for such a fundamental part of the language after so much time has passed is... not realistic. Any conversation around it is bound to be somewhat fraught, and happens often enough that people have gone over it and aren't particularly keen to retread it. To the person starting the conversation it might seem like people are handwaving away arguments or being dismissive.

Re: How I went about learning Rust

#272

Earlier quoted context omitted.

This sounded interesting but I was confused by what you meant by "the book." Looks like that's how it's commonly referred to https://www.rust-lang.org/learn

This is the "The Rust Book": https://doc.rust-lang.org/book/ Affectionally known as "the book"

There's a new design patterns "book" out and it's pretty nifty as well.

Re: How I went about learning Rust

#273
post #247

Earlier quoted context omitted.

>Wouldn’t I still have to check for NoScore? That's right, and the compiler will reject programs where you don't do this. It's a set of safety rails for your code. You pay a dev-/compile-time cost in exchange for your programs not exploding at runtime.

Yes but that’s no less work than checking for null in TypeScript. The parent said: > In your example, you still have to manually check if there's a value every time, but this is not compiler-enforced.

Sure, it's the same amount of work, but you're forced to do it and the compiler will be able to reject invalid programs. In languages that allow null (including TS, it doesn't 100% enforce the stuff that Haskell, etc. does), you can skip that check, saving some work I suppose, at the risk of your code exploding at runtime. Having stack traces which jump across 50,000 lines of code because someone forgot to check for null somewhere sucks a lot.

Re: How I went about learning Rust

#274

Earlier quoted context omitted.

Rust actually supports most OOP features, with the main exception of implementation inheritance. And implementation inheritance is a nasty footgun in large-scale software systems (search around for: "fragile base class problem"), in a way that just doesn't apply to simple composition and pure interfaces (traits). So it's hard to fault Rust for including the latter and not the former.

> Rust actually supports most OOP features, with the main exception of implementation inheritance. I've tried some basic OOP. Fields from the base class need to be redefined in each child, and making shared methods private require an ugly workaround. Both concepts are very basic OOP concepts, not advanced or inherently/tendentially dangerous, and the results is that even basic Rust OOP requires a lot of boilerplate.…

The idea of object inheritance is silly. If you need a 'base' class A for data type B just do

    struct B {
      a: A
    }

Re: How I went about learning Rust

#275

I love rust. I didn’t find it difficult to learn and at this point several others I’ve introduced it to also haven’t. I’m baffled as to where that reputation comes from. I get that it makes you think about what you’re building a little more than something you can throw together like Python or Ruby but if the end goal is software that works correctly, getting there definitely isn’t harder with rust. It’s the complete…

> I’m baffled as to where that reputation comes from. It's a deep language with a mix of borrowed syntax(es) and designs. You can pick up Go or Python or Nim in an hour and have a working application, that's fairly unlikely with Rust. I'd say it took me a year to feel comfortable with Rust - to the point where I could just sit down and write applications without Googling every five minutes - which is far longer than…

This is good because no application of any import should be built in a language with which one has faux similarity.

A lot of really nasty problems are caused by people thinking they understand what JavaScript is doing.

Re: How I went about learning Rust

#276
post #3

I have been thinking to myself whether I should pick up Go or Rust as a new language this year. Coming from a NodeJS background, Rust looks a tad more complicated but it looks cooler. There are also more job listings looking for Golang than Rust which makes me wonder if Golang might be a more rewarding investment? What would be a good use case of Rust than Golang cannot do given its extra complexity and potentially l…

I worked in Haskell for many years. It is an absolute myth that rare languages command less salary. Remember the more popular the language, the more supply, hence less pay.

Re: How I went about learning Rust

#277
post #3

I have been thinking to myself whether I should pick up Go or Rust as a new language this year. Coming from a NodeJS background, Rust looks a tad more complicated but it looks cooler. There are also more job listings looking for Golang than Rust which makes me wonder if Golang might be a more rewarding investment? What would be a good use case of Rust than Golang cannot do given its extra complexity and potentially l…

I think rust is the new haskell. After spending 7 months learning it, I can say I really enjoy the language, but there's no job in it and in my opinion, they take academic decisions that make the language way more complex than it should. Also, the community is toxic. For example, generics in Go were criticized by some, praised by others. You have the feeling that you can freely share your opinion in the go community…

This is wild to me as someone who spent many years in Haskell and made shit tons of money doing it. There are myriad Haskell jobs available. I'm taking a break right now (mainly to pick up other skills), but would go back to it in a heartbeat. There are lots of Haskell jobs.

Re: How I went about learning Rust

#278

as an embedded c/c++ developer I tried Rust briefly a few times over the years, don't feel it's the right fit, due to the way it's static build by default the binary size is just too large, plus the library pool is still much small, and there is no equivalent to c++'s STL for speedy coding when I need it. yes I can trick for size etc, but overall it just did not fit well so far, for the embedded space that is, but, '…

What in the c++ STL in particular? Rusts iterator traits (or others) subsume almost every c++ algorithm I could think of.

Re: How I went about learning Rust

#279
post #242

Earlier quoted context omitted.

It changes the meaning of some titles. It makes more of them less baity. The danger with these arguments is that you only notice the cases that don't work. That's a 100% failure rate! Can't get more stupid than that! pg suggested this edit to me years ago and I spent a long time back testing it on old titles. At the time, it was a clear win. I suppose it's possible that title conventions have changed since then and t…

> The danger with these arguments is that you only notice the cases that don't work. That's a 100% failure rate! Can't get more stupid than that! I’m gonna go out on a limb and suggest maybe you’re too close to this. I notice the “clear win” cases frequently too. At best they’re very clearly and awkwardly editorialized. I click on them frequently just to reassure myself that I’m aware I’m not mistaking reality for fi…

What's "\d" in this context?

Re: How I went about learning Rust

#280
post #158
post #147

Earlier quoted context omitted.

Yes it does, OOP is a spectrum not "like Java does it".

I'd consider something OOP if it has the same expressive power i.e. things expressible in OOP languages are easily expressible in another OOP language as well. And for Rust that's not the case. Otherwise you end up with Haskell is an OOP language.

> I'd consider something OOP if it has the same expressive power i.e. things expressible in OOP languages are easily expressible in another OOP language as well.

That doesn't even make sense on its face. There are things which are trivially expressible in Smalltalk and I'm not sure even possible to wrangle in Java.

Post reply on HN