> In the following I’m using the definitions of value, variable and type
> described by C.Date. Values are eternal and immutable. Variables
[quoted text clipped - 31 lines]
> Some people on this NG have suggested that tuples should take a back
> seat role and in the type system all one needs are relations.
As far as I know, I'm the only person who has suggested this. :-)
I would propose a shorthand syntax for specifying a relation
as having exactly one member. At which point, tuples don't serve
any function any more. (In the type system.)
A similar issue exists in ordinary set theory. There is usually
a primitive is-a-member-of relation, with subset defined in
terms of that, but it's also possible to have is-a-subset-of
as a primitive, and define membership from that.
> But consider:
>
[quoted text clipped - 5 lines]
>
> This seems wrong because circle values are not propositions.
You'll have to be more specific before I can respond.
> Now consider:
>
[quoted text clipped - 9 lines]
> regarded as a dynamic collection of named variables that hold circle
> values.
Kinda. I would propose that you don't get too concerned with this.
The same issue (minus the "dynamic" part) already shows up in
your Point type. Are the x and y components contained variables?
In the end I think the question doesn't really matter.
> This brings me to the main point of this post. Consider the following
> to represent a chapter of a book as an abstract mathematical value:
[quoted text clipped - 17 lines]
> represent any tree structure in the form of pure nested values,
> without anything that looks remotely like a pointer to a variable.
Yes. (For the appropriate definition of "any.")
> Nevertheless I would call the structure dynamic not static because it
> isn’t fixed by the static type.
Just so. I use the same terminology myself for classifying trees:
"static structure" and "dynamic structure."
> I find this recursive type definition of a chapter simple and elegant.
> By contrast a relational encoding of a tree structure of chapter
> values will be forced to give the chapters names, and it is possible
> to interpret the data as containing identifiable dynamic variables
> connected up with pointers.
I'm not thrilled with your terminology but I know what you mean.
In fact there have been some meaty threads in the past around
"abstract identifiers" (and some less-than-meaty ones as well)
and I specifically recall Jan Hidders providing some references
to some academic papers with some results along these lines.
> My thinking at the moment is that the RM or the HM (Hierarchical
> Model) on its own is inadequate, and what’s needed most generally is
[quoted text clipped - 23 lines]
> variable that only exists in the scope of defining a TriSurface
> value. Yuk!
I hear you, but I have tended to notice that this aesthetic reaction
is usually over-strong. Consider: if we bring this 3D object into
an editing program, and grab a vertex and move it, what should
happen? We would want all the associated triangles to move,
would we not? This suggests that the vertex really does have
an identity.
Marshall
David BL - 15 Jul 2008 03:36 GMT
> > In the following I’m using the definitions of value, variable and type
> > described by C.Date. Values are eternal and immutable. Variables
[quoted text clipped - 150 lines]
> would we not? This suggests that the vertex really does have
> an identity.
I’m not sure. It doesn’t make sense to edit a value because values
are immutable. One can only edit a variable.
I can see it makes a lot of sense to say that variables may have
subvariables. Eg a Point variable may have subvariables for its x,y
coordinates. Similarly a TriSurface variable may have identifiable
subvariables for the vertices – so no contradiction with a user that
grabs a vertex and moves it.
However I find it questionable to say that a TriSurface value
introduces a context for dynamic variables, and yet it seems implicit
in the relational representation. Perhaps I need to think about it
differently.
On another note...
A value type like list<T> defines the set of permitted values and a
set of operators such as binary + to concatenate two list values into
a single list value, or an index operator that retrieves one of the
elements (as a value) of a given list value.
However it doesn’t specify the available mutative operators on
variables of type list<T>. For example I can imagine various
options:
1. Allows assignment of the entire list value.
2. Allows deletion of elements and insertion of elements as values
3. Exposes the elements as subvariables to allow them to be directly
modified.
There seem to be different ways to skin the cat here. For example,
(2) on its own is sufficient to allow a variable to reach all possible
list<T> values.
Now here’s my question: Do you think it’s permissible for the type
system to allow for controlling the available mutative operations on
variables? Presumably it muddies it up somewhat. I have wondered
whether this is somehow related to the possreps idea.