forgetting a comma when definining a Map results in strings
Posted: 12 Aug 2023, 21:49
This definition of a map,
actually succeeds in defining a Map with a Count of 2, mapping 3 to "412" and mapping "212" to 58.
I'm sure this behavior is intended, but:
1. I'm wondering which section of the docs contain materials relevant for deducing this behavior (I skimmed continuation sections but couldn't see anything directly relevant)
2. I also wonder whether if it's not more intuitive to just throw an error about the lack of commas. The current behavior turn what are almost certainly typos into something meaningful but unintended.
Code: Select all
obj := Map(
3, 4
12, 2
12, 58
)
I'm sure this behavior is intended, but:
1. I'm wondering which section of the docs contain materials relevant for deducing this behavior (I skimmed continuation sections but couldn't see anything directly relevant)
2. I also wonder whether if it's not more intuitive to just throw an error about the lack of commas. The current behavior turn what are almost certainly typos into something meaningful but unintended.