terminology
Opened this issue · 1 comments
NAKsir-melody commented
Right, we should use whatever notation is most Pythonic! :)
I think in Python a fixed-size list is called a "tuple".
I don't care either way. Implementations can use whatever terminology works best. For example, the natural terminology for Go is "array" (instead of tuple) and "slice" (instead of list). Notice that in Python lists also allow heterogeneous types
NAKsir-melody commented
- container: ordered heterogenous collection of values
key-pair curly bracket notation {}, e.g. {"foo": "uint64", "bar": "bool"} - vector: ordered fixed-length homogeneous collection of values
angle bracket notation [type, N], e.g. ["uint64", N] - list: ordered variable-length homogenous collection of values
angle bracket notation [type], e.g. ["uint64"]
SSZ type definition
SSZ spec. | Element Length | Type Length | collection |
---|---|---|---|
vector | fixed | fixed | homogeneous |
vector | fixed | variable | homogeneous |
List | variable | fixed | homogeneous |
List | variable | variable | homogeneous |
Container | variable | variable | heterogenous |
Related types of language
Language | List | Vector | Container |
---|---|---|---|
Python | list | list tuple(not modifiable) dequeue(with maxlen) |
list tuple(not modifiable) |
Golang | slice | array | array( interface) |
C++ STL | vector | array | Vector(void*) |