there’s two problems with this; the first (and lesser) problem is that objects needs to be public, so we have two parallel and largely redundant sets of API on self and self.objects.

the second, and in my mind, much greater problem, is every access to the List32.subscript(_:) is O(n), because it triggers copy on write, see: Performance implications of declaring Array/Dictionary property requirements in a protocol - #2 by Ben_Cohen

what is needed is a way to declare a { get _modify } accessor requirement in the protocol, but there is no way to do that yet.

perhaps sometimes the optimizer can cut through this, but i don’t know of a good workflow for investigating it if can in a particular situation, because you can’t godbolt multi-module setups. (which is my usual go-to strategy for checking if the compiler can optimize something.)