(Previous discussion continued)
Re: why generative? Shiro Kawai 03 Sep 2009 21:00 UTC

Re: why generative? Shiro Kawai 03 Sep 2009 21:00 UTC

>From: xxxxxx@ccs.neu.edu
Subject: Re: why generative?
Date: Thu, 3 Sep 2009 15:36:05 -0400 (EDT)

> > In most programming languages programmers do give unique names
> > to the different record types with same field specs.  I assume
> > we can ask that much of work to the programmer's side if she
> > wishes to have distinct types.
> Are you making an analogy between the unique cookie you proposed
> and the names used in other programming languages to accomplish
> something of the same purpose?

Not exactly.  What I'm saying is that we can ask programmer to
choose some descriptive names, and the system may use that in
some way to increate programmer's convenience.

There are two layers in the discussion.

(1) How to eliminate requiring separate global namespace.

(2) How to achieve programmer's convenience of making sure
    (a) no extra construction of type descriptor occurs at
    runtime, and (b) creating distinct types.

Default-generative gives (2b) for free, but tax (2a).
Default-nongenerative gives (2a) for free, but tax (2b).
In either way, we can hide this tax under the syntactic layer.
It's difficult to tell which is better with this regard.

> > Using the syntactic layer, a programmer gives a name to the
> > record.  The syntactic layer may use that to create a unique id
> > to distinguish types with the same fieldspecs.
> If I'm understanding you correctly, you are proposing that the
> syntactic layer simulate nominal equivalence by manufacturing
> a unique id, but that the procedural layer require programmers
> to provide the unique cookie explicitly.  Is that correct?

Yes.  Concerning programmer's convenience, I assume that
mainly syntactic layer matters.