@andy_matuschak I just discovered this myself. I'm using an enum to manage app defaults, and now I can…
AppDefault.Bounciness.intValue = 5
-
-
-
@Sidnicious Yikes. What does that mean? Have a gist? -
@Sidnicious Yes. :) That setter *is* mutating. This will break compilation semantics. - View other replies
-
@andy_matuschak Hah! That's fair. I'd consider it nonmutating, though, because it doesn't change the instance itself, just global state. No? -
@Sidnicious Hm. I think you’re right, actually!
-
-
@andy_matuschak I believe that acts as a whitelist such that an immutable UnsafeMutablePointer value can still have its memory mutated. -
@andy_matuschak@NatashaTheRobot wrote a small story about why/how to use nonmutating in#swiftlang :http://bit.ly/1SFFG3j
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.
Andy Matuschak
Sidney
Andrew Richardson
Justin Spahr-Summers
kamidude