folklore.org

The Newton, The First PDA:   1 of 11  

A Modest Proposal to Extend NewtonScript
Author:Paul Potts
Date:May 1997
Status:Draft
Summary:A tongue-in-cheek suggestion for making NewtonScript inheritance even more elaborate.
Revision:most recent of 2

OK, we all know and love the cool NewtonScript dual inheritance model. It gives you an easy way to separate visual hierarchy and inheritance of implementation. You can use these generalized _proto and _parent mechanisms for your own purposes as well -- your code need not be arranged into views.

But it is time to extend this mechanism even further. I'm proposing that the following additional predefined slot mechanisms be added to the NewtonScript language definition. This extended mechanism could have all sorts of uses, especially in the implementation of genetic algorithms.

_dominant

Inheritance achieved via this slot would override inheritance via any of the other predefined slots.

_recessive

Inheritance achieved via this slot would only take place in the absence of any other type of inheritance, which would automatically override it.

_mutant

Frames accessed via this slot would be DeepCloned, and a probabilistic alteration would occur, of some sort: a slot name would be changed, its contents altered, the type of a slot changed, a string or array shortened or lengthened, or a real number changed.

_adopted

The system would choose an existing view and access it via this slot, similar to the existing parent inheritance mechanism. For example, your view could become (unexpectedly) an adopted child of the datebook.

_unexpected

This slot would be used to simulate, for example, finding out that your father is not the man you thought he was but actually a traveling vacuum-cleaner salesman that happened to drop by your house one day while your mother's husband was at work. "You mean I'm actually part of protoBasicEndpoint?"

_alien

This slot is used for implementation inheritance and its use can result in strange results taken from other operating systems entirely. For example, accessing a removed card store using alien inheritance could result in the message "Not ready error reading PCMCIA slot 1. Abort, Retry, Ignore?"

Back to Newton Getting In on the Ground Floor
Login
Account Name:

Password:

Create a new account

Related Stories
No Related Stories


Rate This Story
Overall Rating: 5.00
(best)
Login to add your own ratings

  0 Comments    

Creative Commons License The text of this story is licensed under a Creative Commons License.