Open pliniker opened 4 years ago
Originally, Array didn't have runtime-borrow capability and I made the (hasty) decision to base the Array struct on using Cell<RawArray<T>>.
Array
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.
RefCell
borrowflag
Source: interpreter/src/array.rs:42 Book: booksrc/chapter-interp-arrays.md
interpreter/src/array.rs:42
booksrc/chapter-interp-arrays.md
Originally, Array didn't have runtime-borrow capability and I made the (hasty) decision to base the
Array
struct on usingCell<RawArray<T>>
.It is clear that it makes far more sense to use
RefCell
now, both from a semantic and performance basis. The explicitborrowflag
can also be removed.Source:
interpreter/src/array.rs:42
Book:booksrc/chapter-interp-arrays.md