News for hackers. Stuff that matters.
Re:‘Abusing’ the C switch statement – beauty is in the eye o... by pkkim on Thursday February 02, 2017 @11:56AM (#13552022)
Probably not for production use (as most "interesting" code isn't): https://en.m.wikipedia.org/wiki/Duff's_device
Re:‘Abusing’ the C switch statement – beauty is in the eye o... by ConceptJunkie on Thursday February 02, 2017 @05:32PM (#13555521)
You say that, but I pulled out several instances of Duff's Device from production code a few years ago, and replaced them with memcpy( ) and memcmp( ) as appropriate. This isn't 1986 any more.