[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why generative?

This page is part of the web mail archives of SRFI 99 from before July 7th, 2015. The new archives for SRFI 99 contain all messages, not just those from before July 7th, 2015.



Shiro Kawai wrote:
> Current SRFI-99 make-rtd doesn't seem to be able to take
> mutable records.  The only aggregate types it can take are
> a vector as fieldspecs and an RTD as parent.  I believe
> the fieldspecs vector and its elements should be treated
> immutable semantically (i.e. RTD is defined by its content
> at the creation).  If the fieldspecs vector and its content
> are immutable, the parent RTD is also "functional".

Agreed.  My bad.

That leaves only the dangers of using structural equivalence.

> 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?

> 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?

Will