[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Curl, multiple inheritance, and interfaces (was Re: cheerful static typing)
> All this is true, but think of the case in which you do not have
> the ability to add an "implements" clause to a class because it
> lives in a 3rd party library which you not allowed to change.
Ah! To resolve that - assuming I wanted to - I'd prefer a language feature
which allows you to attach 'implements' to a class to which you don't have
the source. Then you'd be saying something like "assume class X is
Lockable" - you could do this centrally somewhere, if you like. Then it
would be OK to say "variable y is Lockable" elsewhere, and know that 'y'
could accept an instance of class X. Since these two statements make rather
different claims, separating them looks to me like A Very Good Thing.