4 ms·
I wouldn't go so far as to say this is horrible code, I also wouldn't say this is good refactored code. It definitely gets the job done; however, I would imagi
by wilmoore 14y ago
I wouldn't go so far as to say this is horrible code, I also wouldn't say this is good refactored code.
It definitely gets the job done; however, I would imagine someone figures they'll come back and refactor at some point. Code is never finished, it is merely shipped. This is shipping code, but it certainly can be refactored into a more intention revealing function.
It's a trade-off. If you pull it into a new function, it adds LOC. It also is another layer of abstraction. Is it worth it? Perhaps...but maybe not. Just looking at this one line of code in isolation without context is a bit unfair though.