News for hackers. Stuff that matters.
Re:Go is still not good by nothrabannosir on Friday August 22, 2025 @10:30PM (#44992516)
It makes types very predictable though: a var int is always a valid int no matter what, where or how. How would you design the type system and semantics around initialization and declarations without defaults? Just allow uninitialized values like in C? That’s basically default values with extra steps and bonus security holes. An expansion of the type system to account for PossiblyUndefined<t>? That feels like a significant complication, but maybe someone made it work…
Re:Go is still not good by bccdee on Sunday August 24, 2025 @05:22AM (#45002737)
No, I'm saying the language should never permit uninitialized or undefined values in any context. Make `int i;` a compile error and force the user to write `int i = 0;`. Rust does this.