@mjtsai compare ObjC - switching between mutable and immutable is completely explicit and inspectable. Including when passing arrays as args
-
-
@nuoji Aren't "var" and "inout" just different ways of spelling "mutable"? That's explicit.0 replies 0 retweets 0 likes -
@mjtsai it only describes the language rules, it does not describe the behavior of the underlying runtime.0 replies 0 retweets 0 likes -
@nuoji Right. BTW, my understanding is that this sort of thing was once a (lesser) issue in ObjC as well.0 replies 0 retweets 0 likes -
@mjtsai if you send an NSMutableArray / NSArray as arg, copy only happens on explicit copy. In Swift, this depends on code & optimization.0 replies 0 retweets 0 likes -
@mjtsai since this is strongly dependent on optimization it ends up unpredictable. This is a very real issue with Swift right now.0 replies 0 retweets 0 likes -
@nuoji Agreed. Do you think this is fixable?0 replies 0 retweets 0 likes -
@mjtsai the most worrying part is that issues are patched as they are discovered. It looks like any addition to the lang would then -0 replies 0 retweets 0 likes -
@mjtsai require additional patches for every special case.0 replies 0 retweets 0 likes -
@mjtsai compare ObjC where there aren't all that many places where you can optimize.0 replies 0 retweets 0 likes
@nuoji I guess this is what happens when you move functionality from the libraries into the language.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Christoffer Lernö
Michael Tsai