On Nov 23, 2:33 pm, [EMAIL PROTECTED] (Aristotle Pagaltzis) wrote:
> The API you propose does not seem to me to shorten code at all
> and is likely to lead to problematic code, so it seems like a
> bad idea. Interfaces should be designed to encourage people to
> do things correctly and to make it hard to even think about the
> nearly certainly wrong way.
I'm going to both agree and disagree. I agree that the specific
example of &chown.is_restricted is a bad idea, but only because the
POSIX API I was wrapping is itself flawed. In general I would continue
to pursue the approach of adding precondition-checks as methods on
functions, a concept that is orthogonal to the specific example you
are arguing against: I disagree that the code I showed is not simpler
that the original S16 approach.