Sunday, May 31, 2020

Some Things I Don't Like About the Rust Language

1. The print! macro requires a flush of the output device to show any text.

This is just stupid. The newbie programmer to Rust will use print! and expect to see output. If the high priests of Rust programming want to keep their purity of not flushing output automatically, then create a new print! macro that does flush the output; name it something like printout!. (This retains backward compatibility with previous programs using print!.)

2. Functions return the last expression implicitly. Again, that will confuse the newbie Rust programmer, as well as any non-Rustacean who is just looking over the code. It's wrong, because it requires esoteric knowledge of the language. A returned value should require an explicit return ; statement.

3. The --release flag during compilation handles integer overflow differently than a normal developmental compilation, producing completely different results.

What?! Again, to avoid unexpected errors, the developer must know esoteric knowledge about Rust. Bad, bad, bad.

4. Strings are way more complicated than they should be.

====

NOTE: These viewpoints are from a non-programmer, who has no right to pontificate on how a programming language should be. Nevertheless, these viewpoints are correct.


1 comment:

Kent West said...
This comment has been removed by a blog administrator.