Loose type checking in E
Ka-Ping Yee
ping@lfw.org
Fri, 23 Oct 1998 01:07:33 -0700 (PDT)
Jonathan wrote:
> Summary: interfaces are better than inheritance. Inheritance is not
> better than nothing.
I think i understand the reasoning behind Jonathan's and Tyler's
position now. It is the uncontrolled widening of interfaces that
seems most awkward and dangerous in a language that tries to
promote security. I can see why it might be better to encourage
authors to do their delegation explicitly rather than casually
tossing in catch-all matchers without thinking -- one then is able
to see, in one object definition, all the capabilities granted to
any holder of the object, without needing to follow chains of
granted authority.
So, it is clear to me that inheritance ought to be avoided as much
as possible when the goal is to minimize authority. The question
that remains has to do with whether taking inheritance out of the
language will make too many other things (that don't necessarily
require security) too inconvenient in E, or serve as an immediate
put-off to those who assume that a language must have inheritance
to be truly object-oriented. I can bet that if E is presented as
not having inheritance, some lists of scripting languages will point
out "but it has no inheritance" as some sort of deficiency (i've
seen such feature-comparison lists) which may bother some. Whether
or not we could then convince people in general that inheritance
ought to be avoided, i can't say. On the other hand, of course,
even if you have inheritance, you can always choose not to use it.
!ping