News for hackers. Stuff that matters.
Re:“Clean” Code, Horrible Performance – Casey Muratori [video] by pkolaczk on Tuesday February 28, 2023 @11:20AM (#34971027)
> You're thinking of defaultless switch statements. Rust and Typescript catch those issues as long as you don't add a default. I'd already thought of it when I typed it

But the same problem exists with interfaces and virtual dispatch! If you provide a default implementation at the interface / abstract class level, then the compiler won't tell you forgot to implement that method, because it would see the default one exists.

Re:“Clean” Code, Horrible Performance – Casey Muratori [video] by sebstefan on Wednesday March 01, 2023 @05:39AM (#34980831)
Default implementations at the interface level, wow, apparently it's a thing in Java. I don't think it's in C++.