|
|
|
|
|
by nikki93
2844 days ago
|
|
Because `.foo` means `[‘foo’]` and because you can easily make sequences out of them (if you write `{ ... i1 = v1, v2, ... }` then `v2` automatically gets the “next” natural number as a key) the ergonomics make them usable as structures and arrays easily. Also the ‘:foo()` syntax binds the LHS of the operator as the first parameter for a method call, and metamethods allow you to easily implement inheritance / dispatch / etc. It’s more about ergonomics than availability. |
|
[0] https://docs.python.org/3/library/types.html#types.SimpleNam...