Re: [TED] ACTION-294: Propose a treatment of sequences

Gary Hallmark wrote:
> I find the pairs really tedious.  How about
>
> class LIST
>    subclass EnumeratedList
>       property element : TERM*
>    subclass RecursiveList
>       property element : TERM+
>       property rest : TERM
Does it mean that a recursive list cannot be empty and that its "rest"
ist a list term? If yes, this would be strange, I think.

Why not recursive type definitions like:

class LIST
     emptylist
     or listconstructor(element LISTITEM, LIST)

with whatever syntax deemed appropriate. My point is that a list
definition must define both the emptylist and an operator 'list
constructor' (or however it might be called) with two arguments, a list
item (or however it might be called) and a list.

Francois

Received on Tuesday, 26 June 2007 08:06:07 UTC