Make schema and dataspace record and tuple patterns extensible
At present, a schema pattern {a:int b:int}
will match {a:1 b:2 c:3}
as well as {a:1 b:2}
(but not {a:1}
or {b:2}
).
However, a pattern <a int int>
will match only <a 1 2>
, and not <a 1 2 3>
(or, of course, <a 1>
). The same goes for e.g. pattern [int int]
.
This is inconsistent and should change. Records and tuples should match if they have arity at least that of the pattern concerned, not exactly that of the pattern.
Syndicate dataspace and attenuation patterns should also change in the same way.
Plan
-
update spec text for preserves-schema -
cook up a few test cases -
update javascript implementation -
update python implementation -
update racket implementation -
update rust implementation (which already seems to do the new thing!) -
update Squeak implementation