Should Antiforms Be Legal in MAP! (Keys, Values?)

In the pre-isotopic era, there was a concept that MAP! would not allow you to store nulls. Because null was the signal of not being in a map. Assigning a key null was a way of removing items from that map.

>> m: make map! [x 20]
== make map! [
    x 20
]

>> m.x
== 20

>> m.y
; null

>> m.x: null
; null

>> m
== make map! [
]

Additionally, NULL was not allowed as a key.

How Should This Change In The Isotopic Era?

We still have the case that mapping to null (or void, that causes null retrieval?) would conflate with testing for presence or absence in the map.

I'll make the point that not allowing you to store antiforms as keys or values isn't a fundamental problem, because you can META a value to put it in, and then UNMETA it when taking it out.

Disallowing Widens The Gap With Objects

There have been questions about what the difference is between maps and objects, and this would be another: objects must be able to have members that are isotopes: action isotopes that can run implicitly, logic and null and other word isotopes, and I'm presuming splices and other stable forms as well.

It would mean a map has more in common with a block...more easily being converted to or from it.

I don't know right now whether to allow or disallow. So for starters I am going ahead with the premise that antiforms can't be stored in maps, as either keys or values. We'll see how it goes. If it is relaxed, it will be relaxed only for the values...in order to have parity with objects.

1 Like