Dynamic Swift
mjtsai.com
Dynamic Swift
1–10 of 54 posts
Re: Dynamic Swift
#2Re: Dynamic Swift
#3That's not entirely true; libobjc2[0] exists, for example, and is fully compatible with objc4.
Re: Dynamic Swift
#4You don't necessarily want dynamism, you want metaprogramming.
Re: Dynamic Swift
#5"Great web frameworks like Ruby on Rails, for example, can’t be built without relying on a more dynamic language." You don't necessarily want dynamism, you want metaprogramming.
Re: Dynamic Swift
#6Some of the classes in Apple's frameworks need to be overridden, some of them cannot be overridden, some of them don't both to call their overridden accessors - it's a mess! You can only discover this stuff by reading the documentation (if it's even there), when it ought to be enforced by a strict compiler.
Re: Dynamic Swift
#7Re: Dynamic Swift
#8Not sure I see what's going on here (it's just a blog post linking to other blog posts?), but is this arguing that Apple should turn the safety of Swift back into the unsafe mess of Objective-C? Horrifying stuff like swizzling, respondsToSelector tricks, etc.? That's what Swift is trying to get away from! Some of the classes in Apple's frameworks need to be overridden, some of them cannot be overridden, some of them…
Most of the of the community seems to have moved on, with the understanding that of course you can't reimplement performSelector/KVO/(insert dynamic, non-type safe feature that usually just bites you in the ass in the long run) from scratch, but we still have Objective-C that already implemented those features, and we will have it for years, if not decades, to come. Maybe Apple doesn't have to open source UIKit to prove their commitment to Swift (a short, albeit slightly unfair, summary of a blog post last week from another member of the old guard)
There seems to be a general lack of imagination, and lack of understanding that Apple would never rewrite UIKit or other large, existing frameworks in Swift. But, once Swift is more stable in a year or two, maybe you start thinking about new frameworks being written in Swift, with Objective-C compatibility, instead of vice versa.
Maybe you can't write Rails in Swift, but by god, why would you ever write Rails again? There's been two heavily up voted stories here in the past two weeks describing how awful it is to have a career dependent on a framework so dependent on dynamic untyped code. That matches exactly with my experience being pressed into service writing Rails code for a couple months - the development experience felt like the Stone Age compared to Swift, even if I could write a method ~20% faster.
Re: Dynamic Swift
#9Not sure I see what's going on here (it's just a blog post linking to other blog posts?), but is this arguing that Apple should turn the safety of Swift back into the unsafe mess of Objective-C? Horrifying stuff like swizzling, respondsToSelector tricks, etc.? That's what Swift is trying to get away from! Some of the classes in Apple's frameworks need to be overridden, some of them cannot be overridden, some of them…
Re: Dynamic Swift
#10Not sure I see what's going on here (it's just a blog post linking to other blog posts?), but is this arguing that Apple should turn the safety of Swift back into the unsafe mess of Objective-C? Horrifying stuff like swizzling, respondsToSelector tricks, etc.? That's what Swift is trying to get away from! Some of the classes in Apple's frameworks need to be overridden, some of them cannot be overridden, some of them…
The Objective-C old guard has had a very hard time dealing with Swift. For a couple years now, every 3 months they have another blog post hand-wringing about what they used to do in Objective-C, how they can't in Swift, with the implicit warning this is worrisome and _needs_ to be reimplemented in Swift, or Swift isn't a serious contender long-term. Most of the of the community seems to have moved on, with the unders…