3 ms·
This was actually part of something else I've been working on rather than attempt at deliberately reinventing the wheel. That said, I do think there's some bene
by mattdonnelly 12y ago
This was actually part of something else I've been working on rather than attempt at deliberately reinventing the wheel. That said, I do think there's some benefit in rewriting existing Objective-C frameworks in Swift as Swift's interoperability with Objective-C can be difficult to deal with at times
- mikevm 12y agoWhy is the code so verbose? let result = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, self.bridgeToObjectiveC(), charactersToLeaveUnescaped, charactersToBeEscaped, CFStringConvertNSStringEncodingToEncoding(encoding)) as String
- mattdonnelly 12y agoAlmost all of Apple's frameworks written in Objective-C and C are incredibly verbose. It's just an adopted style of the language and although it's often a little difficult to look at, it can be quite helpful sometimes
- menzoic 12y agoSwift should be less verbose
- mattdonnelly 12y agoIt is actually, but functions like the one mentioned above are bindings for Objective-C / C functions and share the same name as the function they bind to
- cschep 12y agoWhile Swift is a new language, that method is calling into very old framework code written in Objective-C. Which is very verbose.
- Glide 12y agoThat looks more like a C function call. If it was an Objective C message the named parameters would make it far more verbose (and readable).