On Mon, 10 Jun 2024 17:11:17 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

> > The term 'subset' doesn't feel right to me here, since we're only talking 
> > about a single memory region (not a set of memory region**s**). I suggest 
> > 'sub-region' instead.
> 
> Actually, nvm, that doesn't work for `reinterpret` since the returned segment 
> can also cover a larger region of memory.

In my opinion, any 'sub' terminology is misleading since, as you pointed out, 
one can (and often will) `reinterpret` to a *larger* size. Wouldn't something 
like, "The returned memory segment is backed by the same region of memory that 
backs this memory segment", be sufficiently accurate? Could even append, "No 
memory will be allocated or deallocated", to really hammer the point home.

Using 'subset' for `asSlice` makes sense. Though possibly unnecessary.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19633#issuecomment-2160083878

Reply via email to