[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Curl, multiple inheritance, and interfaces (was Re: cheerful static typing)



Dan Weinreb wrote:
> Yes, I agree completely.  And remember that email I sent a while ago
> about how it would be nice if interfaces, in addition to simply
> specifying the entrypoint names and their arg types and return types,
> could also say more interesting things about their semantics, like
> that write("foo") followed by write("bar") is the same as
> write("foobar") in the absence of exceptions, or that addition is
> commutative, etc?  I think that's a natural extensions or
> generalization of what interfaces are really for, and if there were
> such features then what you're saying above would be even easier to
> see and demonstrate.

I agree in principle.  In practice, though, this kind of thing seems to get
complicated quickly - Eiffel might be an example.  My purely subjective take
is that there seems to be a point beyond which diminishing returns start to
kick in, although this may just be because no-one (?) has produced a system
that's sufficiently natural, powerful, flexible and correct to make the
extra complexity worthwhile to a wide audience.  But if I were writing
Ariane-rocket-launching code, I might want to go the extra distance and use
something like this...

Anton