2 ms·
Declaration doesn't reflect usage, it's not a helpful principle in general. You create tuples with () but access them with [], and the fact that [a, b, c] is a
by lmm 12y ago
Declaration doesn't reflect usage, it's not a helpful principle in general. You create tuples with () but access them with [], and the fact that [a, b, c] is a list has very little to do with the fact that you use [] to index into it. The {} syntax for dictionary literals is reasonably common; Ruby's looks fairly similar, and Javascript uses almost exactly the same syntax, which many people will be familiar with thanks to JSON. Are there any other popular syntices for dict literals?