brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 110 forks source link

presentation of (mutable) string-dict #1717

Open shriram opened 11 months ago

shriram commented 11 months ago

When you click to expand on a (mutable) string-dict, it looks like this:

image

However, this presentation doesn't make any sense. This is not an array. The order doesn't matter. And the items are paired up. It should instead give a key-value presentation, e.g., "" is associated with [mutable-string-dict: "y", 1, "", 0, "ny", 2, "any", 3, "tany", 4], etc.

blerner commented 10 months ago

It makes exactly as little sense as the syntax [mutable-string-dict: "", 2, "y", 1, "ny", 1, "any", 2, "tany", 3] does...but at least they're consistent.

shriram commented 10 months ago

Well, arguably it makes a bit less sense. But anyway, the point is not to argue that we need a better constructor syntax, but rather that we need better presentation syntax for dictionaries.