Re:Swifter – A Twitter Framework written in Swift
by sz4kerto on Saturday June 14, 2014 @12:43PM
(#7893094)
And it starts again - web framework, 2048, flappy bird, http server, PySwift, JSwift, How I switched from Go to Swift, Swide: The Open Source swift IDE.. :)
[ Parent
| on HN ]
Re:Swifter – A Twitter Framework written in Swift
by mattdonnelly on Saturday June 14, 2014 @01:26PM
(#7893181)
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
Re:Swifter – A Twitter Framework written in Swift
by mikevm on Saturday June 14, 2014 @01:47PM
(#7893214)
Why is the code so verbose?
let result = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, self.bridgeToObjectiveC(), charactersToLeaveUnescaped, charactersToBeEscaped, CFStringConvertNSStringEncodingToEncoding(encoding)) as String
Re:Swifter – A Twitter Framework written in Swift
by mattdonnelly on Saturday June 14, 2014 @01:55PM
(#7893224)
Almost 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
Re:Swifter – A Twitter Framework written in Swift
by menzoic on Saturday June 14, 2014 @01:56PM
(#7893227)
Swift should be less verbose
Re:Swifter – A Twitter Framework written in Swift
by mattdonnelly on Saturday June 14, 2014 @02:00PM
(#7893240)
It 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
Re:Swifter – A Twitter Framework written in Swift
by cschep on Saturday June 14, 2014 @01:56PM
(#7893229)
While Swift is a new language, that method is calling into very old framework code written in Objective-C. Which is very verbose.
Re:Swifter – A Twitter Framework written in Swift
by Glide on Saturday June 14, 2014 @02:33PM
(#7893315)
That 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).
Re:Swifter – A Twitter Framework written in Swift
by higherpurpose on Saturday June 14, 2014 @01:08PM
(#7893146)
Maybe they'll make even a Swift SPDY server.