> Creating a new language and repeating the "billion dollar mistake" by including null (sailing under the brand name "nil" in Go) is just crazy. Can you explain? What do I set ‘score’ to when someone hasn’t sat the test yet?
The Billion Dollar Mistake refers to the fact that things that are not explicitly marked as "nullable" can be null/nil. In rust, you would annotate score as `Option ` (`u32` is one of Rust's integer types), and then you would set the score of someone who hasn't sat the test yet as `None`, and someone who got a 100 on the test as `Some(100)`.
Oh yeah, allowing values to be nullable by default is bad, that's totally different than just 'including null'. I thought they meant including null in the language!
> you would set the score of someone who hasn't sat the test yet as `None`
> there's no job in [Rust] As of today, indeed.com lists 1,500 remote jobs mentioning Rust vs. 4,018 jobs mentioning Golang. That's not so bad. (However, there's no way to tell how many of those listings are Rust-specific as opposed to polyglot job descriptions.) > Also, the [Rust] community is toxic. Speaking slightly humorously, if you think Rust community is toxic, try expressing your dissatisfaction with Swift or…
Most "jobs mentioning Rust" are in the crypto space for some reason. I can't fault devs for thinking that such "opportunities" are just not very serious compared to the alternatives.
Development is development.
Video games are not "serious", yet any C++ developer getting their chops in video game programming is not shunned for it.
A bit unrelated: Maybe I'm wrong, but I get the impression that the people who learn Rust, tend to be quite experienced programmers. I have yet to see complete beginners document their journey, starting with Rust. I've seen lots of people do that with C/C++, Java, and the other usual suspects - but Rust still seems like a language for at least intermediate programmers.
There are definitely easier languages to learn for complete beginners. When someone needs to learn what a "string" is, it's not helpful to immediately require them to also learn the difference between a "heap-allocated string" and a "borrowed string". However, you don't need to be an expert to learn Rust. It even helps if you don't have too many expectations about OOP and pointers, because their Rust equivalents have…
> it's not helpful to immediately require them to also learn the difference between a "heap-allocated string" and a "borrowed string".
That's largely a special case of the general difference between owned and referenced data, which applies to all non-trivial data types. "String" just happens to be the first of those that most novice coders will encounter. If anything, it makes a nice "toy" case for the general distinction.
I tried to pick up Rust a few years ago, but there were too many sharp edges. I thought it was a nice language, but was too early for actual use. I played with some libraries (Apache Arrow, etc) and it was nice. About 2 months ago I wanted to use Arrow within Elixir, which required me to start using Rust again (Elixir uses Rustler to safely convert from Rust Elixir without theoretically crashing the beam). I am amaze…
However, if I'm not mistaken, the language still has no formal specification.
A second implementation based on GCC is underway and will help press this very issue.
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…
Since you're coming from a NodeJS background, you'll want to pick up an introductory textbook about C as well. Rust implicitly relies quite closely on the C machine model, and introductory books about Rust (such as "The Rust Programming Language") don't do a very good job of conveying the nitty-gritty details of that model to novice coders. This is a pretty nasty pitfall when trying to code in Rust, and it's importan…
I tried to pick up Rust a few years ago, but there were too many sharp edges. I thought it was a nice language, but was too early for actual use. I played with some libraries (Apache Arrow, etc) and it was nice. About 2 months ago I wanted to use Arrow within Elixir, which required me to start using Rust again (Elixir uses Rustler to safely convert from Rust Elixir without theoretically crashing the beam). I am amaze…
I mean it depends . Many of aspects of Rust that are perceived as sharp edges are in fact the programmer bringing in their preferences and paradigms from other languages and trying to program that way in Rust. I was one of those and tried to do OOP in Rust. It was a pain. At some point I gave up and was like: "Okay Rust, I do it your way, I just want this to work". And it worked flawlessly and easy. I literally had t…
As someone who even structures their Python in OOP, I'd appreciate elaboration on how you organize your Rust code. I've been glancing at Rust for far too long, never finding a weekend to dive in. Save me some headaches, how should I approach e.g. Customer - Product - Order relations without OOP? What is the canonical "Rust Way"?
GP is also wrong. At this point it's mostly a meme. Rust is slow to compile. I mean, yeah if you abuse meta programming or monomorphisation. I've been programming in it, and while I like the language, I'm not on the language community bandwagon. E.g. CoC and it's enforcement (I think it's just pointless grandstanding).
I've seen pretty much zero grandstanding in the Rust community about the CoC. They seem to treat it as any CoC should be treated in practice; a failsafe measure which is most critical for in-person events, and to protect people who make their real-world identity public from aggressive trolling and malicious behavior.
First. You are arguing against my sidenote, on why I don't consider myself Rust coolaid member.
Second: it's just my opinion.
Third: I said CoC is grandstanding. It's just a toothless document, that pretends to solve issues much like renaming Git default branch master->main.
We saw it wasn't enforceable last year when Rust moderators quit over being unable to enforce it.
I’m on a similar track. Web/java background and started doing some tutorials and aoc, currently working on the the same ray tracer challenge book (it’s awesome). Not sure what a next step would be, maybe that one book where you implement a web browser or some raspberry pi project. Any recommendations?
I tried to pick up Rust a few years ago, but there were too many sharp edges. I thought it was a nice language, but was too early for actual use. I played with some libraries (Apache Arrow, etc) and it was nice. About 2 months ago I wanted to use Arrow within Elixir, which required me to start using Rust again (Elixir uses Rustler to safely convert from Rust Elixir without theoretically crashing the beam). I am amaze…
I mean it depends . Many of aspects of Rust that are perceived as sharp edges are in fact the programmer bringing in their preferences and paradigms from other languages and trying to program that way in Rust. I was one of those and tried to do OOP in Rust. It was a pain. At some point I gave up and was like: "Okay Rust, I do it your way, I just want this to work". And it worked flawlessly and easy. I literally had t…
Having studied mostly OOP/Java at the uni, and been using mostly C# at work, I realized I might actually start to find programming fun again through Go. I've studied it a bit recently and this idea of interfaces with composition over inheritance etc. made somehow a lot more sense to me, and gave me this boost to try and learn it more because it felt so enjoyable. Not even with some practical problem at hand to solve, but just on an abstract level, not having to deal with OOP classes and inheritance and all the things. Now I just need to find a Go job and get my feet a little more wet. ;P I'm talking about Go because it gives me similar feelings as Rust, but Rust I have a lot less experience with. I hope there's a similar fun and excitement to be found in Rust as well, after unlearning some old habits.
I mean it depends . Many of aspects of Rust that are perceived as sharp edges are in fact the programmer bringing in their preferences and paradigms from other languages and trying to program that way in Rust. I was one of those and tried to do OOP in Rust. It was a pain. At some point I gave up and was like: "Okay Rust, I do it your way, I just want this to work". And it worked flawlessly and easy. I literally had t…
As someone who even structures their Python in OOP, I'd appreciate elaboration on how you organize your Rust code. I've been glancing at Rust for far too long, never finding a weekend to dive in. Save me some headaches, how should I approach e.g. Customer - Product - Order relations without OOP? What is the canonical "Rust Way"?
Your customer, product and order are still going to be objects, but they won’t reference each other directly with references/pointers. Instead they’ll either store an id, or you’ll have a central registry of relationships using some kind of id (could be a key into a hashmap or an index into a vector) and then fetch data from the central store (or have the caller pass it in) at the last minute when running code that does something.