On Thursday, 31 July 2014 at 14:02:28 UTC, Johannes Pfau wrote:
Will this be added to code.dlang.org?
There's a question on reddit regarding performance. I'd guess
performance should be quite good in general, but the simple
throws/allocates* Exceptions on missing files. Does this
* I guess in this case you could 'cache' the exception in a
global variable, but druntime still allocates the stack trace
once though). Druntime uses some tricks to avoid these
for OutOfMemory errors and this trick should probably work
as well, but I still wonder if it isn't easier to simply
result code from getattr and readdir.
the choice of using throw for exception was mostly to follow the
python-fuse bindings which we initially used for a prototype. I
agree that we could instead return a value for performance
considerations. However there is a balance of how many errors you
expect and, as far as I am concerned, the more convenient way of
reporting errors using exceptions up the callstack.