Live data from Hacker News

An interactive guide to learning Rust

github.com

11–20 of 55 posts

Re: An interactive guide to learning Rust

#12

What's the relevance of learning Rust for someone into web development?

> What's the relevance of learning Rust for someone into web development?

Rust is a language that cares a lot about correctness. If I were particularly interested in making sure the code I wrote worked in production, Rust would be my first choice in the set of a dozen languages I know.

Rust is probably quite a bit faster than whatever you're using for web development. The normal counterpoint to this is that web requests tend to be rate limited by the database. This is mostly true but using Rust pretty much guarantees this will be the case. I believe that this point isn't that compelling with current architectures but would be worthwhile in a CQRS architecture where formatted data gets pushed/cached by the web servers and servicing requests stays on-machine.

Rust is one of the more compelling web assembly languages due to not needing a garbage collector. Demos exist but this is mostly in the exploratory stages.

Longer term, I expect Rust to have a unified async networking stack. You can do blocking IO networking in Rust but I expect most network clients/servers to be mostly async once the Tokio stack settles. This is all expected in node but the networking libraries tend to be fractured in most languages.

I don't think you should run out and switch over to Rust for general web development. There's going to be a big release in the fall that rolls up a bunch of ergonomic/convenience stuff that should make it easier to pick up and less annoying to use. I also think that IDE support will be important for a lot of people learning Rust. The situation is improving but the support is not up to par compared to more mature languages. All told, it's serviceable but I don't expect it to be particularly compelling as a web development language for at least another year or two.

Re: An interactive guide to learning Rust

#13
I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects.

Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

Re: An interactive guide to learning Rust

#14
post #7

Earlier quoted context omitted.

What kinds of things could you do with web assembly that you can’t do in native JavaScript? I know very little about web development.

Mostly it lets you not use JavaScript, which you may or may not be excited about, depending on how much you think the problem with web development is JS.

There are plenty of languages that compile to JavaScript. They don't save you from having to interface with the DOM and other JavaScript APIs, but neither does WebAssembly (which currently has no such capabilities at all, save through JavaScript FFI).

Re: An interactive guide to learning Rust

#15
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

https://trends.google.com/trends/explore?q=java,golang

Re: An interactive guide to learning Rust

#16
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

If your goal for learning is to just be more employable then yeah I think its a waste of time. The language is probably worth keeping an eye on though and knowing enough about it to consider it in the future if it does pick up significant traction.

And to go even more off topic. I thought the go hype was kind of dying down?

Re: An interactive guide to learning Rust

#17
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

Rust and Go, while really similar, kind of are different in use -- the key differntiator is memory management, and memory safety. For a LOT of applications, this isn't necessary or a big deal (see: just about every program written in a language that isn't c/c++).

I see Golang replacing Java longterm and Rust replacing C/C++ (yeah, even C) due to the memory safety and preciseness + speed it offers. It may never be truly C speed, but from where I stand the tradeoff is worth it (and when it becomes NOT worth it, rust/c interop is SUPER easy).

While I like Rust a lot, I think it's definitely not the language to learn if you want a job right now. If you want a job right now, go learn Java. Unfortunately, depending on the company you go into, you can basically throw away the next X years of your life working with uninsteresting/stagnant codebases, unmotivated peers, and clueless management -- OR you'll find companies that are using Java in a progressive way.

If you want to invest in a language that will likely become a big player in the next 10 years, and is soundly written, maintained and progressed in the open, then commit to rust.

Also a sidenote, most good managers/engineers realize that syntax doesn't actually really matter. Good engineers get up to speed in languages they've never used in days/weeks -- if you know the paradigms, and how to design good programs, it's a matter of just changing what you type.

Knowing X language isn't what makes a good developer, it's knowing some sufficiently multi-paradigm langauge X well enough that you've moved past the basics and started re-discovering paradigms, design patterns, and answers to problems in a few problem domains.

Re: An interactive guide to learning Rust

#18
The Go Tour (https://tour.golang.org) is an excellent guide to getting started to Go, and I really wish something like that existed for rust.

I have no excuse for not being the one to make it (outside of not at all knowing Rust well enough) but I selfishly wish someone would.

Re: An interactive guide to learning Rust

#19
post #13

I know that this is irrelevant, but is it worth the trouble to learn an esoteric language such as Rust? For me it seems a waste of time to learn a language along with its ecosystem where there are few job prospects. Right now Go seems to be on an upward trajectory, and despite its ugliness and how primitive it is, it is the job which can pays off when hunting for jobs.

I think it is worthwhile. If you know a less mainstream language, you can find opportunities to use it at work when it provides a significant advantage, such as being more naturally suited to a particular problem, or having libraries that do what you need. You can also borrow useful ideas and patterns from it and bring them over to the language(s) you do use at work, if they offer ways to improve expressiveness, correctness, maintainability, and so on. Knowing an array of significantly different languages gives you a far broader array of mental tools to use in the design and implementation of software systems than if you stick to one language family or paradigm, even if you only ever use a few mainstream languages at work in practice.

For example, I didn’t have any idea how to do parallelism and concurrency correctly in C++ until using them in Haskell and porting the ideas back over. Same goes for a lot of techniques that were easier to learn in other languages and translate over, like writing parsers, implementing constraint solvers, enforcing complex invariants with types, &c.

Re: An interactive guide to learning Rust

#20

Earlier quoted context omitted.

As a web developer, you can write servers that take orders of magnitude less space, memory, and CPU than a similar JS server, without having to deal with the madness that is first-time C development.

Give me something that can run ReactDOM.renderToString() faster, and I'm all ears. Until that day (and I'm kinda hoping it comes) I'm a bit stuck.

https://github.com/DenisKolodin/yew
Post reply on HN