4 ms·
The third option, of course, is to just comment your clever code to make it less cryptic. Yes, you can have your pie and eat it :)
by huhtenberg 7y ago
The third option, of course, is to just comment your clever code to make it less cryptic.
Yes, you can have your pie and eat it :)
- nomel 7y agoUnless there’s a real and needed benefit, why complicate it? I’ve seen clever code that was 300% faster, half the lines, completely unreadable, and called once per session, for a total the time of 10ms in a workflow that was minutes long. No amount of commenting could justify it.
- bagacrap 7y agoThe compiler doesn't care about comments, so in my experience comments quickly go out of date as others change the code and ignore comments. There's nothing to say code can't be performant and legible. In fact I'm a bit confused what "clever" means here. Writing performant but illegible code does not take more cleverness than performant while legible.