-
-
Notifications
You must be signed in to change notification settings - Fork 4
rust
I am used to working in abstract high-level language like python and swift, who doesn't like the verbosity mandated(?) by a language aimed squarely at embedded/systems programming.
Rust isn't a panacea. Rust is complicated and hard, and often it's not worth taking on that burden just to theoretically handle cases that rarely occur and even more rarely cause any problem. Programming is a means to an end, and the cost of using Rust (hiring, increased development time) is often not worth it.
Rust made verbose ugliness a first class citizen.
pub fn horror()->Result{Ok(Result(mut &self))}
Contrary to mainstream opinion and current hype, I find rust syntax to be abhorrently verbose. Look at swift to see
how optional types can be expressed beautifully without wrapping everything with ->Result{Ok(Result(mut &self))}
It's this mixture of abbreviations on the one hand and excessive sigils and verbosity on the other that really does not resonate well.
pub fn horror()->Result{Ok(Result(mut &self))}
Functions return results, which may be ok. This should be an invisible fundamental of the ABI.
Oddly this ugliness is often mixed with modern beautiful expressiveness;
for i in 0 to 10 {}
Product {
id: 1,
name: "Apple".to_string(),
price: 3.65,
}
The beauty is disrupted by the ugly "to_string()". What was "Apple" before being converted to string??
Implicit return switch case without breaks:
fn value_in_cents(coin: Coin) -> u8 {
match coin {
Coin::Penny => 1,
Coin::Nickel => 5,
Coin::Dime => 10,
Coin::Quarter => 25,
}
}
One has to admit that rust is currently the wasm language with the most momentum, and there are hundreds of promising projects such as
- minecraft: https://github.com/iceiix/stevenarella/issues/171
- a flash player
- ...
Should one ever consider to reimplementing parts of wasp in rust, one might start with https://github.com/mwerezak/sphinx-lang
Explicitly can be good in systems languages, however
pub fn horror()->Result{Ok(Result(mut &self))}
is just ugly and braindead.
"Good rust programmers don't write like this"
Then there is no good rust programmer. I've yet to see a project not splattered all over with hideous .unwrap()
.
Consolidation: Much of the hate for rust vanishes when comparing the cpython mess to clean rustpython!
If you want rust without the cancer, switch to swift