PROTOTYPE
"Objects all the way down."
Part of MOOLLM · This skill's directory
MOOLLM has no classes. Every object is concrete: a directory, a file, or a map inside a file.
An object that lacks a slot asks its parents, in order, and the first one that has it answers.
That's Self's model, applied to a filesystem an LLM walks.
Self in one page
A Self object is a set of slots. Some hold data, some hold code, and some, marked with *,
are parent slots:
cat: (|
name <- "Terpie".
meow = (| | "Meow!" |).
traits* = catTraits.
|)
Sending meow looks in the object's own slots, then in each parent, then in their parents.
First match wins. There can be several parent slots, and they can be reassigned at run time,
so an object can change what it is by pointing a parent somewhere else. New objects are made by
cloning an existing one and changing what differs. Classes, mixins, traits and generic
functions can all be built from this; none of them is needed to start.