> The idea of removing the error to behave like the rest
> of mg would lead to a brittle design. It's like assuming
> errors can only happen once. It makes code faster, but
> later changes could cause subtle bugs that could be hard to
> track IMHO.                               

Quite the opposite, in fact.  The idea is to catch errors where
and when they happen (i.e. as early as possible), and handle
them appropriately, so they do not propagate.  This means there
are very few places where error checks are needed, which makes
it easier to verify these checks are correct.  This is no different
from designing a function to return as early as possible
if, say, a malloc fails.

If you don't do this and instead let the errors propagate, all the
basic functions will be littered with checks for brokennes that
they shouldn't need to deal with in the first place.  With such
a litter, it'll be easy to break one of these checks.

Why should dired behave different from the rest of mg, when it uses
the same buffer handling code anyway?

Reply via email to