@inessential @brentsimmons Yes, currently Swift isn't just missing Objective-C dynamic stuff like swizzling, but even Java-style reflection.
-
-
-
@mjtsai@brentsimmons Considering how fast Swift has been changing, it's hard to get much of a head of steam behind any specific complaint. - View other replies
-
@siracusa@brentsimmons My guess is that Swift will eventually gain reflection but (alas) continue to have classes non-@objc by default. - View other replies
-
@mjtsai@brentsimmons Unlike the Cylons, I'm going to assume that@clattner_llvm really does have a plan that we're not yet privy to. -
@siracusa@brentsimmons Agreed, but is the plan for a systems language or an app language? Are they dogfooding any major apps? -
@mjtsai@brentsimmons Dogfooding seems like it's off to a slow start, but then, we still have so little visibility into the rest of Apple…
-
-
-
@inessential@brentsimmons I believe KVO only works on Swift classes that inherit from NSObject; they are the only ones using objc_msgSend. -
@inessential@brentsimmons non-objc Swift classes use c++-style vtables; structs prob don’t bother with that, since there is no inheritance.
-
-
-
@inessential@brentsimmons let mirror = reflect(myStruct) for i in 0..<mirror.count { println("\(mirror[i].0): \(mirror[i].1.value)") } -
@inessential@brentsimmons (Good luck turning value’s Any into a useful type, though.)
-
-
@inessential Here's a struct that holds value + date & can merge w/ another instance. Easier to read and maintain.pic.twitter.com/4lKyqH9MNP
-
@inessential Many drawbacks trying to shoehorn a KVO pattern into Swift. Even with static typing, readability sufferspic.twitter.com/8jTvmEXr6R
-
@inessential@brentsimmons Constant dictionaries would give you want you want no? -
@inessential What happens if you implement -valueForKey: in the struct?
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.
inessential
Michael Tsai
John Siracusa
Nathan Corvino
Brent Royal-Gordon
Jason Patterson
Justin Driscoll
Patrick Smith