quint
quint copied to clipboard
Inconsistency between constructor for maps and records
There's a (seemingly) unnecessary inconsistency in our constructors for records and maps:
>>> Rec("beep", 2, "boop", 3)
{ beep: 2, boop: 3 }
>>> Map(("beep", 1), ("boop", 2))
Map("beep" -> 1, "boop" -> 2)
This isn't much trouble in practice, since people are likely to use the {
sugar. However, I think it would be an improvement to make this unform.
There is an important difference between Map
and Rec
. The arguments of Map
should all have the same type, whereas Rec
has other restrictions, namely, even-positioned arguments (counting from 0) are strings. We could use the Map
-like syntax though.