-
-
Notifications
You must be signed in to change notification settings - Fork 5
rust
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, rust has an abhorrently verbose syntax. 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 assumption 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()"
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.
If you want rust without the cancer, switch to swift