News for hackers. Stuff that matters.
Re:Sshole by justmedep on Thursday November 05, 2026 @11:00PM (#50388003)
That’s just a very bad API. You could do the same in Rust? There are nice C APIs that would use a nice struct that describes the timeout you want… eg GCD.
Re:Sshole by eru on Friday November 06, 2026 @04:34AM (#50390187)
I'm not sure a struct is the right thing here in general. You often want an algebraic datatype.

What Rust calls an enum, but an enum with payloads. In C terms it would be a discriminated union.