[e-lang] Data-E: Removing fixed literal type set
kpreid at mac.com
Wed Jun 3 01:03:07 EDT 2009
Data-E currently defines a fixed set of literal types: String,
Integer, Float64, Character. This is less flexible than it could be.
Uses for generalizing the definition of literals:
there are no native integers or characters; it would be convenient not
to have to define handling for these types, yet not deviate from the
* It would be nice for serialization formats such as deBytecodeKit
to be able to define compact representations for e.g. byte arrays.
* If we introduce more literal types to E in the future due to some
change in What a Programming Language Ought To Have, it won't be a
* An intra-address-space comm system using Data-E for proxy
handling would like to share between vats any object which is Data
(deeply immutable and authorityless) and thread-safe.
I have proposed and MarkM has approved and refined this plan:
The buildLiteral/1 message to Data-E builders is renamed buildAtom/1.
A Data-E builder specifies the kinds of objects it will accept as
atoms, by a guard which can be retrieved from it. (We need to choose
the verb for this.)
This does not introduce a large compatibility problem (from
differences in what is considered an atom) because: In most builder/
recognizer compositions, either the recognizer or the builder is
deSubgraphKit. Since the subgraph builder deals in real objects, it
can accept anything as an atom (and just return it). Since the
subgraph recognizer deals in real objects, if the builder's atom guard
rejects an object, the recognizer can proceed by using the uncall
deSubgraphKit's recognizer only invokes the builder's buildAtom if the
object under consideration is Data (i.e. authorityless), and
deSubgraphKit's builder only accepts Data as atoms. This ensures that
Data-E does not carry authority other than that explicitly described
by uses of the defined exits.
I said this in discussion and MarkM wanted me to save it:
"There are objects you agree exist, there are objects you write down,
and there are objects you take apart."
(Those being exits, atoms/literals, and calls, respectively.)
(Hm, analogy with mathematical notation: a number can be written as a
well-known name like π and i, as digit data like 1.324, or as a
formula like sqrt(2)/2.)
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang