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

Design document #68

Open
novacrazy opened this Issue Jan 7, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@novacrazy
Copy link
Collaborator

novacrazy commented Jan 7, 2019

Recently on reddit I received a comment asking to describe the design of generic-array, and after seeing some comments asking how it works/safety/performance and about my numeric-array crate, I decided to give it a go.

Working DESIGN.md document

If anyone wants to check it out, proofread it, point out things I got wrong, missed or should expand upon, etc. feel free.

It's not very formal, but I can make it more formal if deemed necessary.

@fizyk20 what do you think?

@timClicks

This comment has been minimized.

Copy link

timClicks commented Jan 7, 2019

This reads really well. Also, this is kind of incredible:

ArrayLength's implementations use type-level recursion to peel away each least significant bit and form sort of an opaque binary tree of contigious data the correct physical size to store N elements of T. The tree, or block of data, is then stored inside of GenericArray to be reinterpreted as the array.

@fizyk20

This comment has been minimized.

Copy link
Owner

fizyk20 commented Jan 8, 2019

Looks great! It's a really nice description of the inner workings of the crate. Thanks for all the work you're putting into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment