4 ms·
The code smell concept is quite smug. The author argues that instead of flags you could use some convoluted array of pointers to the objects for each flag to s
by rightbyte 4y ago
The code smell concept is quite smug.
The author argues that instead of flags you could use some convoluted array of pointers to the objects for each flag to separate concerns.
Code working around dogmas is the worst "code smell" of them all.
- Gordonjcp 4y ago> instead of flags you could use some convoluted array of pointers to the objects for each flag to separate concerns Which is absolutely lovely if you have limitless memory and processing cycles. Make a sparse hash table of values to make sure you're only storing valid flags? Genius! How much memory is that going to take up? I don't even know how much memory this modern desktop PC I have here has, hundreds or possibly even thousands of kilobytes of RAM. One of the microcontrollers I write code for has 128 bytes of RAM (this paragraph wouldn't fit) and a clock speed in the hundreds of kHz, so, if you're implementing hash tables Good Luck With That. It reminds me of the BCS guys who reckoned that every bit of code should be written in Java, no matter what.