Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not in the Rust community, but it seems like one could have their cake and eat it too, using OOP with DOD storage.

  * Use a special allocator for objects which reserves a vector slot from your structure-of-arrays.
  * Objects records are offsets instead of pointers
  * Object definition includes getter/setters which index the columnar vectors
  * Store fields declared 'columnar' in a value vector. This could even give flexibility to group columns for locality where needed, and allow ancillary data to be stored in a "leftover" struct.


Yes, generational arena allocations are very popular. The larger question is more about the application architecture. Like where does one handle user input? Where does rendering happen? Etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: