2 ms·
It's more about how strongly typed the language itself is. Rust isn't necessarily harder to learn than a scripting language, but a lot of it's syntax is depende
by smoldesu 6y ago
It's more about how strongly typed the language itself is. Rust isn't necessarily harder to learn than a scripting language, but a lot of it's syntax is dependent on how well you understand programming fundamentals. For example, you can't just spin up an integer at will in Rust: you need to specify how many bits you're using, and manually sign or unsign each value to manipulate it accordingly. That's the stuff that will filter out JS writers and Python devotees.
It's not really an insult so much as it is commentary about the language. The focus on zero cost abstraction and correctness at compilation means that it's harder for a Rust dev to write a slow program than it is for a Python or Java dev. Again, not necessarily because of any fundamental issues with the other two languages, but rather that Rust is a pickier language.
- rcfox 6y ago> For example, you can't just spin up an integer at will in Rust: you need to specify how many bits you're using, and manually sign or unsign each value to manipulate it accordingly. let x = 5;
- smoldesu 6y agoI mean, you can do this, but it will still get automatically typed as a u8, which could very easily cause confusion for Python devs who really want to push that value past 255. My bigger point (and likely the authors) was that Rusts integers aren't like Java's ints or Python's bigints. Your laziness in that example is still being penalized, it's just harder to see and therefore, less "correct".
- tux3 6y agoFYI the default is i32, not u8.
- deleted 6y ago[deleted]
- Thaxll 6y agoit's harder for a Rust dev to write a slow program than it is for a Python or Java dev Like C and C++, Rust is by default fast, but the language itself does not provide features that make it easier to write fast code.