How to make maps

Since type checking is being introduced, how can I make maps that contain a key as one class and a value as a other class?
Something like this in C++

#include <map>
int main(int argc, char** argv)
{
    std::map<char,uint32_t> someMap = {
        {'L',256}
    };
    return 0;
}
1 Like

This gets you some of the way:

type UnsortedMap<T, Q> = {[T]: Q}

So you can do something like

strToNum["a"] = 2

ā€¦ but not

strToNum["a"] = true
strToNum[1] = 3
1 Like