- Things I strongly dislike:
- The dividing line between
crate
andstdlib
leans way too far to thecrate
side of things.- Remote dependencies are needed to do virtually everything. There isn’t even a
rand
package in the standard library.
- Remote dependencies are needed to do virtually everything. There isn’t even a
- Implicit returns.
-
Semicolon on return changes behavior:
fn add1(a: i32, b: i32) -> i32 { a + b } fn add2(a: i32, b:i32) -> i32 { a + b; } fn TypeOf<T>(_: &T) { println!("{}", std::any::type_name::<T>()) } fn main() { let a = add1(1, 2); let b = add2(1, 2); TypeOf(&a); TypeOf(&b); }
- At least the compiler errors on this though.
-
-
``` rust let b: i32 = 20; let c = 30i32; let d = 30_i32 ```
- Crate breakage across minor releases of rust.
- Pre-Rust 1.45 [[https://github.com/jsgf/rust/commit/ff9646c0adc149dfff194665785f4daa3aa6d9c3][this]] feature was marked as
unstable
. But post 1.45 it wasstable
- Libs that use this new feature only bumped their semver patch level when they moved to 1.45. This caused unexpected breakage.- For example: [[https://github.com/smol-rs/async-process/issues/1][async-process v1.0.1]] was broken.
- Pre-Rust 1.45 [[https://github.com/jsgf/rust/commit/ff9646c0adc149dfff194665785f4daa3aa6d9c3][this]] feature was marked as
- The dividing line between
Created
April 4, 2022 15:27
-
-
Save qbit/9e51d8762a398fcbb628fa526ccb22e4 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment