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
Replying to
Just curious over here: is it not possible to implement your own raw-buffer-and-ptr-backed data structures for CLR?
Replying to
prbably yes, but what about interiperability then. just asking. This looks like tradeoff
Replying to
you simply can't do reliable COW. Not if you wanna pass your struct into, say, into a system List<T>.
2
Show replies
Replying to
the data structure itself is not the problem, of course. But w/o COW, performance would be *terrible*.




