@rust Blog post: Mutable object trees in Rust, using memory arenas

https://radiki.dev/posts/mutable-cursor-dags-in-arenas-rust/

You are viewing a single thread.
View all comments View context
1 point
*

If you don’t have a perf requirement like “all these things need to be in contiguous memory” then you probably don’t need a generational index anyway… it is effectively a weak reference, after all. ECS stores are optimised for repeatedly iterating over all the things, and games might have complex notions of “reachability”, but most things aren’t like that. There does seem to be a lot of “I don’t like using Rc RefCell” in object arena design that isn’t always justifiable, though nested generics don’t make for the most readable code in the world.

permalink
report
parent
reply
0 points
*

I think we’re more or less in agreement. I lean more towards leveraging language primitives when possible to get the most support from a compiler, but I’ll happily acknowledge that there are no one-size-fits-all designs.

permalink
report
parent
reply

Rust

!rust@programming.dev

Create post

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

Community stats

  • 396

    Monthly active users

  • 837

    Posts

  • 3.8K

    Comments