Weird because it looks like they *did* put in the effort to make String value-ish
Conversation
unfortunately struct-based arrays with copy-on-write semantics are impossible to do on current CLR and JVM. :(
2
@SilverCompiler The same uniqueness analysis Swift uses to avoid checks could also be used to eliminate copies in many cases
1
twitter's a bit brief to explain *why* this can't be done on the CLR, here. But short story is, it can't :(.
1
Just curious over here: is it not possible to implement your own raw-buffer-and-ptr-backed data structures for CLR?
3
you simply can't do reliable COW. Not if you wanna pass your struct into, say, into a system List<T>.
2
1
I mostly just want a Swift compiler I can rely on, so I'm cheering for you both. ;)
2
2
1
6
Replying to



