`[key]value` map can cause runtime network errors

This has no real use case as far as I can tell, so I don’t see why it should be supported.

In Swift this would be Dictionary<AnyHashable, Value>, but only when the key type is explicitly fixed as AnyHashable, otherwise a concrete key-type cannot be changed, not at compile time not at runtime.

If you have Dictionary<Int, Value> the compiler does not allow using string as key values, it will naturally result in a compile time error in a strongly typed language.

The verse docs do not state that maps operate on comparable existential, it only says that the key types have to be comparable. That‘s a very fine detail that does not imply [comparable]value.

1 Like