2 ms·
So what is the advantage of this approach over having a comment beside it? Sounds slightly more complex to me.
by collyw 13y ago
So what is the advantage of this approach over having a comment beside it? Sounds slightly more complex to me.
- peterwaller 13y agoBecause comments can lie. Also, it can be harder to express the generator in a useful way in English than the code itself if the code is well written. The purpose is to make the code as clearly self describing as possible. I would only do it if it made the code read more like a human language and remove too much complexity from one place.