3 ms·
My opinion is that you can write code that's easy to understand, and it is also good for the computer to run. One thing is not in contradiction with the other.
by Shorel 4y ago
My opinion is that you can write code that's easy to understand, and it is also good for the computer to run.
One thing is not in contradiction with the other.
It could lower the reusability of the code, by not having many abstractions, but it will be easy to understand, concise, and it will do what it was written for very well.
- moffkalast 4y agoIt should be written so it's easy for humans to understand first. If that's too slow, then it can be optimized so it's fast, if a bit less readable. 9 times out of 10 it won't be too slow in the first place these days, unless you know beforehand that you need maximum speed for valid reasons.
- aaronbrethorst 4y agoYep exactly
- Shorel 4y agoYour opinion sounds too one-sided to me. That complete disregard for performance is what gave us the endless Electron clients eating CPU/RAM just to do basic chat and music playing stuff. If the code is written with care for both things, readability and speed, the actual state of things would not be so wasteful. You don't need to make it difficult to understand. Just don't disregard performance as an afterthought.