Rust beginner notes & questions

I know I can sound... harsh, but it's "tough love". I like the Rust project and I want to see it succeed, because C++ is long overdue to have real competition.

I think what a lot of open source projects are missing is someone loudly saying "No!". Too many people patting each other on the back for a "job well done" when the job isn't done leads to very happy people pleased to produce something that ultimately is a failure when faced with reality.

For an example of how open source can work, look at Linux. In my humble opinion, the single most important thing that makes Linux successful is Linus Torvalds. He's brutally harsh in his feedback, infamously so. People constantly criticise his language, when he is simply stating facts. Often these are uncomfortable facts people don't like to hear, but must hear to have any chance at success. Some bars are set very high, such as "entry into the kernel", but people are sloppy and lazy. Linus points out that this is unacceptable. People don't like it, but that's not the point, because the computer doesn't care about you feel about the quality of your code.

The rust-lang forum helpfully suggested some related topics, which shows that I'm certainly not the only one with such issues:

To give an example, on Saturday I tried to read and write from a TcpStream using a buffered reader and buffered writer. Using the examples in the docs this was impossible because once the writer was constructed the reader could no longer use the stream.

This kind of "difficult to assemble layers of stream processing" commentary ended up being the bulk of this topic...

And, a topic created by yourself:

I’m trying to learn Tokio and finding it too complicated. The problems for me are:

  1. The sheer number of types involved.
  2. Choice of names for the types is such that they don’t indicate the intent clearly.
  3. Also at a coarser level, many things seem non-intuitive. For example, why is a ServerProto, which is meant to represent a protocol, creating a transport? There are many such design choices which are non-intuitive.

Also a very similar point.

I see a bunch of people are politely saying the same thing over and over.

Has it worked?

Rust is, what, 8 years old now, and the 1.0 release was 3 years ago! Yet it is still obscenely difficult to do really basic things with the language, like read and write a socket. Please excuse my language when I say: "What-the-f***!?"

2 Likes