logoalt Hacker News

afdbcreidyesterday at 10:40 PM2 repliesview on HN

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


Replies

sparkieyesterday at 11:37 PM

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.

dminikyesterday at 11:46 PM

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