by akoboldfrying · 1y ago · 0 comments
Bottom line is, you could have your cake and eat it too - have an int[] that looks like a List<Int>, and vice versa, while retaining the performance characteristics of an array.
interface Box<T> {
T get();
void set(T val);
}
interface IntBox extends Box<int> {
int get();
void set(int val);
}
https://openjdk.org/projects/valhalla/[this] https://inside.java/2024/12/16/devoxxbelgium-valhalla/