Loose type checking in E
Fri, 23 Oct 1998 10:17:23 -0400
At 01:07 AM 10/23/98 -0700, you wrote:
>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
I think you're still missing the magnitude of the point. There aren't any
other things made inconvenient by the lack of inheritance, quite the
The goal is *always* to minimize authority. Software design is about
managing complexity. Simpler is better. KISS. Designs are simpler without
inheritance. Designs are better without inheritance.
As you pointed out in your comments, inheritance encourages people to do
things which will ultimately land them in trouble. Putting inheritance in a
language is like baiting a trap.
It is informative to note that only two of the Design Patterns presented in
Erich Gamma's book use inheritance. For these two patterns, Factory Method
and Template Method, there are better alternative patterns / implementations.
In all of the code that I wrote for Netune, there is no use of inheritance.
Jonathan has now told you that in EROS there is no inheritance.
Are you seeing a trend here? It was a hard-fought and watershed discovery
for me and my ability as a programmer to realize that inheritance is a bad
idea. Jonathan has said that he has made the same discovery. Lots of people
have made this discovery. Putting this discovery in E would be a great gift
to the programming community.
>, 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.
Java fought the first leg of this battle when it eliminated
multiple-inheritance. As I recall, the spat on the newsgroup lasted about
three weeks before people were convinced that it was a bold and good idea.
I also think that there is a lot more goodwill out there for eliminating
inheritance than you expect. I've seen this issue discussed on a number of
different newsgroups and the uninitiated are always won over. The truth of
the situtation is that inheritance is complex and this complexity creates a
natural unease in programmers. People are often very grateful to be told
that they don't have to try to understand something that they are having
>On the other hand, of course,
>even if you have inheritance, you can always choose not to use it.
So, if we keep inheritance, and people use it when they are writing code
that they consider less important, do you think they will stop using it
when they go to write code that they consider more important?