Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added FixedSizeList wrappers #777

Merged
merged 2 commits into from
Mar 17, 2019
Merged

Added FixedSizeList wrappers #777

merged 2 commits into from
Mar 17, 2019

Conversation

vbuterin
Copy link
Contributor

Requires corresponding changes to the spec pythonizer.

Requires corresponding changes to the spec pythonizer.
@JustinDrake
Copy link
Collaborator

Should we go with Arrray? (It's what Golang uses. Also see this comment.)

@CarlBeek
Copy link
Contributor

Should we go with Arrray? (It's what Golang uses. Also see this comment.)

I disagree with this notation. Many, if not the majority of, languages seem to deem Array to be dynamically sized. [Source]

@JustinDrake
Copy link
Collaborator

That table is pretty cool. It looks like it's roughly 50/50 (what they call "init" and "heap" is a special case of fixed sized).

@CarlBeek
Copy link
Contributor

Agreed. My point is more that the terminology may be ambiguous to users of certain languages. (A quick poll of the 3 CS majors in the room with me had them all declaring it to be dynamic. (I am aware this is not a strong argument))

@vbuterin
Copy link
Contributor Author

If we want clarity, the name needs to evoke the property that actually make static and dynamic sized lists different. List vs tuple, array vs slice, list vs array all fail to do that.

I'll keep thinking for better alternatives...

@protolambda
Copy link
Collaborator

Ideas: Mutable List vs Immutable list. Or appendable list vs fixed list. Or list vs vector.

Honestly I think it's better to keep it simple and be clear in the definition of the type itself.
Slice vs Array is clear enough for me, and so is List vs Tuple.

@vbuterin
Copy link
Contributor Author

If one-word-ness is a desideratum then list vs vector is definitely the least bad of what I've seen so far.

@JustinDrake
Copy link
Collaborator

+1 for list vs vector. Happy to rename "tuple" to "vector" in the SSZ spec.

JustinDrake added a commit that referenced this pull request Mar 17, 2019
To be done in combination with #777.

Also:

* Define "fixed-size" and "variable-size" more rigorously
* Use `"` vs `'` consistently
* Add missing `"`
@JustinDrake JustinDrake merged commit 506fdf4 into dev Mar 17, 2019
JustinDrake added a commit that referenced this pull request Mar 17, 2019
To be done in combination with #777.

Also:

* Define "fixed-size" and "variable-size" more rigorously
* Use `"` vs `'` consistently
* Add missing `"`
pipermerriam pushed a commit to pipermerriam/eth2.0-specs that referenced this pull request Mar 28, 2019
* Added FixedSizeList wrappers

Requires corresponding changes to the spec pythonizer.

* FixedSizeList -> Vector
pipermerriam pushed a commit to pipermerriam/eth2.0-specs that referenced this pull request Mar 28, 2019
To be done in combination with ethereum#777.

Also:

* Define "fixed-size" and "variable-size" more rigorously
* Use `"` vs `'` consistently
* Add missing `"`
@hwwhww hwwhww deleted the vbuterin-patch-17 branch March 29, 2019 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants