Multiple Function Outputs? |
Design questions Kernel | Home |
Background |
A young spiritual pilgrim asked an old sage, "What holds up the world?"
"The world rests on the back of a giant turtle," the sage replied. "And what holds the turtle up?" The sage paused a moment, then said, "It's turtles all the way down!" |
The Question |
Update: Some parts of this problem are now solved -- see notes below.
A current bug in the kernel highlights an important design question: what's at the top of the tree of elements? The bug is simple: it's possible to create two elements with the same full name if both their superelements are null. The reason that the kernel currently misses this is that it enforces name uniqueness one element at a time, in Element.Compilation.checkLazy(). This is a fine approach -- it mirrors the semantics nicely. The only problem is that there's nobody to check the names of elements with no superelement. Answer: Separating the ideas of "container" and "element" in the semantics made room for a new "namespace" class, which fixes this bug. Now every element requires an owner, and a namespace itself has no name and has only a single root element; it's thus no longer legal to create multiple top-level elements with the same name. Problem solved! The underlying questions here are:
|
Question Still Open |
The namespace class has neatly solved half the problems here, including the bug that spawned this discussion. Before we can answer the remaining questions, however, the needs of notations and storage systems will need to be a little clearer. I prefer to let the uncertainties dangle until we have a better idea of what's really needed, at which point this will no longer be a difficult question. |
Design questions | Kernel | Home | Copyright 2000-2001 Paul Cantrell |