Re:How JavaScript engines achieve great performance
by bobthebuilders on Wednesday November 24, 2021 @07:21PM
(#29336855)
Most of these things in TS are due to historical artifacts too. Namely code patterns that would not work well without them.
This is an unfortunate relic of pre-1.5 Java. The rest of the Collection API types correctly. A type-safe generic alternative is Arrays::setAll.
> if you try to modify a `List` or similar collection, it may throw an `UnsupportedOperationException`
Again, an historical artifact. `List` is from Java 1.2, you would effectively have to deprecate List<T> for that to work.