3 ms·
Even when you know that you're dealing with a small number of files, and performance isn't critical? It's not a "stupid" interface if it does exactly what you
by duskwuff 6y ago
Even when you know that you're dealing with a small number of files, and performance isn't critical?
It's not a "stupid" interface if it does exactly what you need. And I think this is a pretty common use case.
- boring_twenties 6y agoGo already has en entire namespace devoted to making things easier for "pretty common use cases:" ioutil. That's exactly where this version of Readdir belongs. Otherwise, you'd better be 110% sure of this: > Even when you know that you're dealing with a small number of files, and performance isn't critical? Because if you turn out to be wrong down the line, your only option is now to rewrite the whole thing in a less-stupid language. Might as well just save yourself the trouble and do that from the beginning.