logoalt Hacker News

fweimeryesterday at 8:48 PM2 repliesview on HN

I doubt value classes will be helpful here because the array would have to be immutable. Context: https://openjdk.org/jeps/401


Replies

spockzyesterday at 9:34 PM

Why does the array need to be immutable? Isn’t it enough to allocate the pessimistic max size of the record times the size of the array? In go slices work quite nicely to deal with “immutable” arrays and still be able to work on views on those arrays while keeping the same memory backing.

show 2 replies
joe_mwangiyesterday at 9:01 PM

Yeaaah. You might be right. Hopefully we have this one day https://openjdk.org/jeps/8261007