Live data from Hacker News

A Gentle Introduction to Rust

stevedonovan.github.io

11–20 of 60 posts

Re: A Gentle Introduction to Rust

#11

Speaking as someone who's poked around at the edges of Rust and always come away frustrated, the Rust world does need a "gentle introduction". But while this document seems to understand that need, it gets messy pretty fast. First of all, the introduction is all over the place, and poorly structured. There first section asks "Why Learn a new Programming Language?" but never answers that question (beyond "it's good me…

I think you are a little unfair, expecting the guide to be towards complete beginners who would get confused by the language having curly braces or not...

Rust is not a first language, it's a systems programming language. For previous programmers, the guide looks pretty good to me.

Re: A Gentle Introduction to Rust

#13
post #9
post #7

Why does every single rust promoting article have to bash on c++? They built a GC, good job. But, surely there is something else more worthy of typing about when hyping the language?

> Why does every single rust promoting article have to bash on c++? Because it was built to be a C/C++ replacement. > They built a GC, good job. ?

To me, it feels like Rust really only has value to people who aren't already using C++14/17. The incremental benefit in certain areas is small, and it steps backwards in other areas.

Re: A Gentle Introduction to Rust

#14
post #9
post #7

Why does every single rust promoting article have to bash on c++? They built a GC, good job. But, surely there is something else more worthy of typing about when hyping the language?

> Why does every single rust promoting article have to bash on c++? Because it was built to be a C/C++ replacement. > They built a GC, good job. ?

> Because it was built to be a C/C++ replacement.

That doesn't mean discussions including it have to bash C or C++. In fact, there is supposedly a very high standard in the official Rust community against bashing other languages.

Plenty of languages have completely replaced or circumvented C and C++ (i.e., out-competed them) in their respective niches without it being a heated two-minutes hate every time discussions come up.

Re: A Gentle Introduction to Rust

#15

Speaking as someone who's poked around at the edges of Rust and always come away frustrated, the Rust world does need a "gentle introduction". But while this document seems to understand that need, it gets messy pretty fast. First of all, the introduction is all over the place, and poorly structured. There first section asks "Why Learn a new Programming Language?" but never answers that question (beyond "it's good me…

I think you are a little unfair, expecting the guide to be towards complete beginners who would get confused by the language having curly braces or not... Rust is not a first language, it's a systems programming language. For previous programmers, the guide looks pretty good to me.

> Rust is not a first language, it's a systems programming language.

Since when are sys prog langs not introductory languages anymore? I understand that using an dyn typed, interpreted, GCed lang is easier to get started with; but a whole (2) generation(s) of programmers has started with systems programming as their first experience, and I must say they seem well equipped for they jobs (maybe better so than those only exposed to Python/JS/Java/C# that leave higher educations nowadays).

I see it as two different educational strategies: easy first vs hard first. And even when easy first was not an option back in the days, it does not mean that hard first is a bad option nowadays.

A ref to this letter by Dijkstra may be on point (where he "discusses" the move from Scheme/Haskell to Python/Java in a university curriculum).

https://chrisdone.com/posts/dijkstra-haskell-java

Re: A Gentle Introduction to Rust

#16

Speaking as someone who's poked around at the edges of Rust and always come away frustrated, the Rust world does need a "gentle introduction". But while this document seems to understand that need, it gets messy pretty fast. First of all, the introduction is all over the place, and poorly structured. There first section asks "Why Learn a new Programming Language?" but never answers that question (beyond "it's good me…

"Disaffected C++ programmer" is altogether too accurate characterization of the author :). I've been removing references to other languages because (a) it's confusing (b) can be dismissive ("trash talking") - a language should stand on its own merits. So yes, a first draft.

I try to express the paradox - that although Rust is about explicitness, type inference hides the actual concrete types chosen - `f64` and `i32` are examples. This needs to be made .. explicit.

Personally I don't think it's possible for people with no prior exposure to programming to learn Rust effectively - unless they are exceptional (in the sense of being 'unusual'). This is because of certain hard constraints when learning a systems language that can't simplify computational models with a garbage collector. So, everyone comes from somewhere - but very different places. That's a challenge I haven't handled well enough (yet).

Being gentle is hard. We have to identify the cliffs, and find alternative routes to the top. I really appreciate this criticism, by the way, since most of the feedback has been technical/typos up to now.

Re: A Gentle Introduction to Rust

#17

Parsing with `nom` seems like a pretty aggressive introduction to Rust :)

I got carried away with a personal enthusiasm. It happens :) `nom` is marvelous, but the hard bit with combinatorial parsers is getting them to spew out good error messages. By default they are like Prolog - the answer is 'no'.

Re: A Gentle Introduction to Rust

#18
post #10
post #7

Why does every single rust promoting article have to bash on c++? They built a GC, good job. But, surely there is something else more worthy of typing about when hyping the language?

Rust finally provides an alternative to C++ in one of the few niches that still mandated C/C++, and now that there is an alternative, it's easy for people to get carried away with evangelism.

I'm obviously a fan, but evangelism does not sit easily with engineering. Can alienate outsiders, and pump up a positive bubble in which sound criticism might be neglected. (In fact, /r/rust has a 'no zealotry' rule.) This submission was not my idea, even though I'm not _too_ embarrassed.

Re: A Gentle Introduction to Rust

#19
post #14
post #9

Earlier quoted context omitted.

> Why does every single rust promoting article have to bash on c++? Because it was built to be a C/C++ replacement. > They built a GC, good job. ?

> Because it was built to be a C/C++ replacement. That doesn't mean discussions including it have to bash C or C++. In fact, there is supposedly a very high standard in the official Rust community against bashing other languages. Plenty of languages have completely replaced or circumvented C and C++ (i.e., out-competed them) in their respective niches without it being a heated two-minutes hate every time discussions…

I approve whole-heartedly of the "no zealotry" rule. (I seriously doubt that the Jehovah's Witnesses have achieved conversion rates commensurate with the effort expended.) That being said, C has problems, particularly the assumption of the "sufficiently smart programmer". Because I'm not smart enough, I appreciate the nagging of the Rust borrow checker, although to be honest it is a complete pain at first.

Re: A Gentle Introduction to Rust

#20

Speaking as someone who's poked around at the edges of Rust and always come away frustrated, the Rust world does need a "gentle introduction". But while this document seems to understand that need, it gets messy pretty fast. First of all, the introduction is all over the place, and poorly structured. There first section asks "Why Learn a new Programming Language?" but never answers that question (beyond "it's good me…

"Disaffected C++ programmer" is altogether too accurate characterization of the author :). I've been removing references to other languages because (a) it's confusing (b) can be dismissive ("trash talking") - a language should stand on its own merits. So yes, a first draft. I try to express the paradox - that although Rust is about explicitness, type inference hides the actual concrete types chosen - `f64` and `i32`…

So the uses are pretty hardcore: operating systems, device drivers and embedded systems that might not even have an operating system

I think this falls a little short. Think of tools like ripgrep which make use of C/C++-class speed with higher level language features.

Post reply on HN