News for hackers. Stuff that matters.
Re:Sshole by dmantis on Thursday November 05, 2026 @08:44AM (#50378973)
Wouldn't Rust's Result or go Error checking prevent that?

I mean a person would probably use it instead of the * hack.

Re:Sshole by ninkendo on Thursday November 05, 2026 @08:56AM (#50379095)
[delayed]
Re:Sshole by tialaramex on Thursday November 05, 2026 @09:22AM (#50379409)
> NULL is a valid instance of T

This by the way is Tony Hoare's famous "Billion Dollar Mistake"

Re:Sshole by uecker on Thursday November 05, 2026 @11:29AM (#50381140)
A NULL pointer for error would be a safe interface where you get a trap when there is no value.
Re:Sshole by 65a on Friday November 06, 2026 @09:33AM (#50392751)
Minor nit, strings are never nil in Go, so that would be "" instead. The point stands though, a common pattern is "defer foo.Close()", the Close() signature almost always returns an error and almost no one checks it...which is probably fine, but not automatically fine.