3 ms·
I want to say that yes, if it's simple and straightforward enough or obvious then just do it - it should have been written like that in the first place. BUT I
by Cthulhu_ 7y ago
I want to say that yes, if it's simple and straightforward enough or obvious then just do it - it should have been written like that in the first place.
BUT I think a more important consideration is readability and clarity. Make it work, make it pretty, make it fast - in that order. If there was anything I learned from a Go course some time ago (Ultimate Go iirc) is that speed is a natural result of readable code. Plus if your code is good and well structured it becomes trivial to benchmark, identify and resolve any performance issues.