News for hackers. Stuff that matters.
Re:John Carmack on Inlined Code (2014) by StavrosK on Tuesday July 19, 2016 @11:14AM (#12122228)
That's all good, unless you need to do it twice. Then you're repeating yourself, and you're in a whole other world of pain next time you want to change some of the code.
Re:John Carmack on Inlined Code (2014) by stcredzero on Tuesday July 19, 2016 @12:55PM (#12122904)
2x copy-paste is a "whole other world of pain"? I've worked in shops where the rule was you didn't make a method or otherwise refactor until there were 3 repeats of the same code. If you're in an environment where you can make the prophylactic search for that code pattern, this works well. (I could easily make searches with full syntactic expressiveness.)
Re:John Carmack on Inlined Code (2014) by StavrosK on Tuesday July 19, 2016 @03:14PM (#12124073)
> 2x copy-paste is a "whole other world of pain"?

Yep, namely when someone fixes a bug in one of the paths but forgets to update the second.

Re:John Carmack on Inlined Code (2014) by stcredzero on Wednesday July 20, 2016 @02:08PM (#12131154)
Sorry, but this isn't a "whole other world of pain." Increase the multiple to dozens, hundreds, or thousands. That is a whole other world of pain. (I've worked in a project that started with literally 500 re-implementations of doubly linked lists.)