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
When to use a dict and when to use a shape is a question that IME often trips up people new to the language, especially folks coming from PHP who aren't used to thinking about those use-cases as materially different. See, for example, this SO question as a recent example which prompted this report -- but I've given the same explanation to FB bootcampers many times too.
At the very very end of the page on vec, keyset, and dict, is this note:
If you want different keys to have different value types, or if you want a fixed set of keys, consider using a shape instead.
IMO, that footnote is pretty unclear and is unlikely to help anyone who isn't already familiar with this idea, and is also a bit hard to see at the bottom of an otherwise very busy page. This idea seems to deserve its own section or even page, more than that footnote?
Where is the problem?
The pages on shapes and dicts.
What is the problem?
When to use a dict and when to use a shape is a question that IME often trips up people new to the language, especially folks coming from PHP who aren't used to thinking about those use-cases as materially different. See, for example, this SO question as a recent example which prompted this report -- but I've given the same explanation to FB bootcampers many times too.
At the very very end of the page on vec, keyset, and dict, is this note:
IMO, that footnote is pretty unclear and is unlikely to help anyone who isn't already familiar with this idea, and is also a bit hard to see at the bottom of an otherwise very busy page. This idea seems to deserve its own section or even page, more than that footnote?
Please don't change anything below this point.
The text was updated successfully, but these errors were encountered: