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

In implementation of Array, replace Cell<RawArray> with RefCell #37

Open
pliniker opened this issue Aug 21, 2020 · 0 comments
Open

In implementation of Array, replace Cell<RawArray> with RefCell #37

pliniker opened this issue Aug 21, 2020 · 0 comments
Labels
data structures Area: internal data structures good first issue Good for newcomers

Comments

@pliniker
Copy link
Member

pliniker commented Aug 21, 2020

Originally, Array didn't have runtime-borrow capability and I made the (hasty) decision to base the Array struct on using Cell<RawArray<T>>.

It is clear that it makes far more sense to use RefCell now, both from a semantic and performance basis. The explicit borrowflag can also be removed.

Source: interpreter/src/array.rs:42
Book: booksrc/chapter-interp-arrays.md

@pliniker pliniker added good first issue Good for newcomers data structures Area: internal data structures labels Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data structures Area: internal data structures good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant