Hacker News (curated)new | past | comments | ask | show | jobs| show hidden

That is called an index. If you want it to be standalone, you can bundle it with the ArrayList.


I wish languages made it easier (or possible) to track index ownership at compile time.

I think parent was after base+offset+index rather than just base+index.

Examples would be eg, `string_view` or `ArraySegment`. They hold some offset relative to a base allocation, and when we index the string_view or ArraySegment we're indexing relative to that offset.




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