3 ms·
While that's true, when you get to a point where you have to write a small library - so that you need to cater to all of the language and standard additions - t
by einpoklum 4y ago
While that's true, when you get to a point where you have to write a small library - so that you need to cater to all of the language and standard additions - that's when you start experiencing pain. How do I expose the right iterators and sentinels? What do I have to specialize? Do I need to define concepts? Do I need to use concepts from elsewhere? I am often at a loss...
- legends2k 4y agoWhile this is true to some extent, trying to be overly generic and solving for all cases is the root of the analysis-parslysis. I end up solving just the part that's needed for the problem in hand but accepting meaningful compromises and trade offs when faced with this issue.
- gpderetta 4y agoPremature generalisation is the root of all evil. According to Stepanov generalisation is something you are supposed to discover as you develop a program, not something you do from first principles.
- einpoklum 4y agoThat may be relevant when you're writing a program. When you're writing a _library_, the "discovery" has already happened. But you can't just use the minimum level of generalization useful for your own program(s), you need to consider the conceivable needs of fellow programmers.