Open braxtonmckee opened 4 years ago
I see that the "+" operator is implemented for ConstDict, but it looks like this will be the "|" operator as of Python 3.9. Other missing operations: d.copy() d.fromkeys() reversed(d) [for 3.8] Besides converting Dict(T1,T2) -> ConstDict(T3,T4), I think that's all the missing operations.
[Regarding Dict: The "+" operator is not implemented for Dict, but when we do implement it, it should be the "|" operator as of Python 3.9. The Dict implementation is also currently missing copy, fromkeys, and reversed support.]
Right now, we have an incomplete implementation that doesn't actually let you do much with const dicts. We should implement the full set of semantics, including adding, converting from typed things like Dict(T1, T2), etc.
Also, we should probably implement the formal tree model for it, because right now lots of standard operations in the interpreter are quite slow if the dicts get large.