Ooh, yikes, won't be able to compile my stuff with these limitations: docs.elementscompiler.com/Silver/Differe
Conversation
"The standard Swift [T] and [T:U] Array and Dictionary types are classes and not structs" gross
2
2
4
1
1
Weird because it looks like they *did* put in the effort to make String value-ish
1
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
Replying to
1
I mostly just want a Swift compiler I can rely on, so I'm cheering for you both. ;)
2
Show replies



