.LIST < > vs. 0-alist

Is RELS.LIST < > equivalent to RELS 0-alist ?

I see that @guyemerson used .LIST < > in his version of matrix.tdl updated with append-lists; is there a reason to prefer one to the other?

0-1-alist := append-list &
  [ LIST 0-1-list ].

0-alist := 0-1-alist &
  [ LIST null ].

Don’t read too much into that :stuck_out_tongue:

0-alist constrains LIST null, so technically 0-alist is more specific than an append-list that happens to have LIST null. But I can’t think of a use case where this should matter.

I put the the 0-1-alist, 0-alist, and 1-alist types in for convenience (as parallels for 0-1-dlist, etc.), but if they’re actually making things more confusing (because there’s more than one way to constrain the LIST, which has the information we actually care about), then maybe the best thing is to get rid of these types entirely. In other words, always put the constraints directly on LIST.

The extra subtypes of diff-list are necessary, because the LIST must be an open-ended list. But this isn’t true for append-list.

1 Like

@ebender What do you think? Should I normalize everything to .LIST < > in the customization system (where I currently might have 0-alist)?

I don’t have a strong opinion except that keeping things uniform is probably less confusing. So, pick either 0-alist or LIST < >, whichever seems more sensible to you.