[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
prototyping vs systems engineering languages
- To: self-interest@self.stanford.edu
- Subject: prototyping vs systems engineering languages
- From: Charles (Froggy) Fiterman <cef@blistr.mwc.com>
- Date: 3 Sep 92 13:33:53
- Resent-date: Thu, 3 Sep 92 13:07:26 PDT
- Resent-from: Urs Hoelzle <urs@otis>
- Resent-message-id: <9209032007.AA05676@otis.Stanford.Edu>
- Resent-to: real-self-interest
While self is designed as a prototyping language, it has the oppourtunity
to be a systems engineering language also. The users of prototyping
languages often would like to be able to turn on some lint like rules and
turn their prototypes into saleable software without rewriting the world.
Also the rules in systems engineering languages are often a good way to
find bugs, witness the success of lint.
I would like to divide inheritance notions into genetic inheritance and
logical inheritance and suggest that self can treat them as totally
separate concepts.
Genetic inheritance is mearly a convienient way of building things. If you
use an existing class "dog" as a good place to start building a new class
"cat" it does not mean that a method expecting a "dog" parm can get a "cat"
parm. Thus in turning a "dog" into a "cat" the user should be allowed any
surgery desired even deleting the "barking" method.
Logical inheritance is a way of generalizing methods. If a method expects a
parm of class "animal" and "dog" logically inherits from "animal" it only
means that the methods of "dog" are compatible with those of "animal" not
that "dog" geneticly inherits from "animal" or that their internal
structures are in any way similar. The most logical structure for polygons
in very different from the most logical structure for squares but a method
recieving a polygon should be able to get a square and act on it normally.
It should be possable to create "cat" from "dog" genetically and then say
that "cat" logically inherits from "animal". In creating classes siblings
often have more in common than parents and children.
In prototyping mode self would say, fine "cat" logically inherits from
"animal". In systems engineering mode it would check for compatible methods
and ambiguitys, prompting the user to create a "cat" that could be safely
used wherever an "animal" is expected. In systems engineering mode type
checking would be done on parms at compile time. In prototyping mode it
would be ignored.
C++ can't do this because it must rely on children having a structural
relation to parents. Self has a unique oppourtunity because it builds code
at run time.
Allowing logical inheritance graphs to be modified adds new fields of
exploration. The real function of new languages like Self IMHO is to open
new kinds of thinking. One of the most profitable forms of language
extension has been "X is now a first class object.". Logical inheritance
graphs can be a first class object, I wonder where that will lead.
--
cef@mwc.com Spelling errors in this document are
708-291-6700 x119 caused by uucp compression algorithims