Rust for the Polyglot Programmer
Sep. 29th, 2021 04:39 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Rust is definitely in the news. I'm definitely on the bandwagon. (To me it feels like I've been wanting something like Rust for many years.) There're a huge number of intro tutorials, and of course there's the Rust Book.
A friend observed to me, though, that while there's a lot of "write your first simple Rust program" there's a dearth of material aimed at the programmer who already knows a dozen diverse languages, and is familiar with computer architecture, basic type theory, and so on. Or indeed, for the impatient and confident reader more generally. I thought I would have a go.
Rust for the Polyglot Programmer is the result.
Compared to much other information about Rust, Rust for the Polyglot Programmer is:
Dense: I assume a lot of starting knowledge. Or to look at it another way: I expect my reader to be able to look up and digest non-Rust-specific words or concepts.
Broad: I cover not just the language and tools, but also the library ecosystem, development approach, community ideology, and so on.
Frank: much material about Rust has a tendency to gloss over or minimise the bad parts. I don't do that. That also frees me to talk about strategies for dealing with the bad parts.
Non-neutral: I'm not afraid to recommend particular libraries, for example. I'm not afraid to extol Rust's virtues in the areas where it does well.
Terse, and sometimes shallow: I often gloss over what I see as unimportant or fiddly details; instead I provide links to appropriate reference materials.
After reading Rust for the Polyglot Programmer, you won't know everything you need to know to use Rust for any project, but should know where to find it.
Thanks are due to Simon Tatham, Mark Wooding, Daniel Silverstone, and others, for encouragement, and helpful reviews including important corrections. Particular thanks to Mark Wooding for wrestling pandoc and LaTeX into producing a pretty good-looking PDF. Remaining errors are, of course, mine.
Comments are welcome of course, via the Dreamwidth comments or Salsa issue or MR. (If you're making a contribution, please indicate your agreement with the Developer Certificate of Origin.)
edited 2021-09-29 16:58 UTC to fix Salsa link targe, and 17:01 and 17:21 to for minor grammar fixes
(no subject)
Date: 2021-09-29 07:55 pm (UTC)One thing that would be useful at the start is something on just how polyglot the reader is expected to be.
I have just read "Rust's type system is based on Hindley-Milner-style algebraic types, as seen in languages like ML and Haskell." Not knowing either of those, it's difficult to know what to do first: look up H-M, look at those languages, or look at another Rust guide.
(no subject)
Date: 2021-09-29 09:32 pm (UTC)So, I have just made that phrase a link to https://en.wikipedia.org/wiki/Algebraic_data_type which is quite a good article. I was resisting making every technical term a link (especially to general references sources) but you're not the first to trip over this. And actually maybe I should stop thinking of Wikipedia as a general reference source and instead realise that it's actually a universal specialist reference source - which is why the maths articles are inscrutable...
Typo in the introduction
Date: 2021-09-30 02:09 pm (UTC)Regards, Alex
Re: Typo in the introduction
Date: 2021-09-30 02:18 pm (UTC)Re: Typo in the introduction
Date: 2021-09-30 02:25 pm (UTC)Regards, Alex