Speeding up DCD in big projects
H. S. Teoh
hsteoh at quickfur.ath.cx
Tue Jul 21 19:00:41 UTC 2020
On Tue, Jul 21, 2020 at 05:59:53PM +0000, aberba via Digitalmars-d wrote:
> On Tuesday, 21 July 2020 at 17:32:39 UTC, H. S. Teoh wrote:
[...]
> > Which also begs the question, *why* does it even throw in the first
> > place. The non-existence of a file is a normally-expected outcome
> > of isFile/isDir, throwing in that case seems excessively
> > heavy-handed. It's probably a case of bad API design.
>
> I would say a work in progress
[...]
Hardly. AFAICT the API has been like this for many years now. If it's
WIP then "progress" has come to a standstill and we need to do something
about it.
And as it turns out, there's a bug filed for it:
https://issues.dlang.org/show_bug.cgi?id=10240
I am of the opinion that isDir/isFile should not throw if the file
doesn't exist. That kind of ivory-tower-ideal API is just excessively
heavy-handed and not useful in practice.
T
--
EMACS = Extremely Massive And Cumbersome System
More information about the Digitalmars-d
mailing list