You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on a protobuf plugin to convert protobuf into WIT.
I wonder if there is a way to define a hashmap/map/dictionary that would allow me to do something similar to map<uint32, bool> map_uint32_bool = 96; in protobuf.
Is this in the roadmap, or should I use map_uint32_bool: list<tuple<string, bool>> for this case?
Ideally, I would have a map type for this; it is commonly expected nowadays I feel.
The text was updated successfully, but these errors were encountered:
Yes, for right now, list<tuple<string, bool>> is the way to go. There is #125 filed already to add a first-class map<K,V> or dict<V> type (the latter fixing the key type to string). I increasingly think this would be quite valuable for many languages, so I think it's a good idea and just a matter of time/prioritization. The main reason for not doing it yet is that there are some tricky design questions (listed in #125), although I expect we can find some workable compromises.
I am currently working on a protobuf plugin to convert protobuf into WIT.
I wonder if there is a way to define a hashmap/map/dictionary that would allow me to do something similar to
map<uint32, bool> map_uint32_bool = 96;
in protobuf.Is this in the roadmap, or should I use
map_uint32_bool: list<tuple<string, bool>>
for this case?Ideally, I would have a
map
type for this; it is commonly expected nowadays I feel.The text was updated successfully, but these errors were encountered: