Better HN
topnewbestaskshowjobs
Log inSign up

minexew

58 karma · joined Oct 4, 2017 (9y ago) · 4 submissions

Submissions

1.

List of computer history videos, documentaries and related folklore (2018)(github.com ↗)

90 points · by minexew · 6y ago · 6 comments

2.

TempleOS programs in Linux user-space, part 2: Anatomy of a kernel(minexew.github.io ↗)

4 points · by minexew · 6y ago · discuss

comment 9y ago · link · parent

I should have clarified more; you'd use this for switches where you need to always handle all cases. Then if a you add a new value to the enum but forget to update the switch, you get a compile-time error instead of a buggy program.

comment 9y ago · link · parent

My absolute favorite for modern C++ is

-Werror=switch

Using this, you can enforce that a switch statement over an enum value is complete (covers all cases) simply by omitting the default case.