His “If…” observations could easily be condensed into a Bechdel-style test. Easy to game, not entirely accurate but starts painting a picture of the maturity & productivity of the language.
It’s funny to consider how poorly Swift does against this “Bone Test” (mostly due to all the Objective-C/Foundation heritage):
- Hello World in < 5 lines: pass
- Sending email in 1 line: fail
- GET/POST to web page in 1 line: fail
- Number of days between 2 dates: pass
- JSON: fail
- Modern datatypes: mostly passes but no REGEX in Swift is a big fail. The matching Foundation class NSRegularExpression doesn’t count because Jeff is clearly asking for native, in-language support.
- Package distribution: fail (although now you can finally build Frameworks for iOS, not just Mac OS, and if we’re counting third-party, it’s likely that CocoaPods will support Swift soon)
So final score 2/7 on the Bone Test, although I’m sure by the time Swift goes GA a lot of them should be fixed.
It’s funny to consider how poorly Swift does against this “Bone Test” (mostly due to all the Objective-C/Foundation heritage):
- Hello World in < 5 lines: pass
- Sending email in 1 line: fail
- GET/POST to web page in 1 line: fail
- Number of days between 2 dates: pass
- JSON: fail
- Modern datatypes: mostly passes but no REGEX in Swift is a big fail. The matching Foundation class NSRegularExpression doesn’t count because Jeff is clearly asking for native, in-language support.
- Package distribution: fail (although now you can finally build Frameworks for iOS, not just Mac OS, and if we’re counting third-party, it’s likely that CocoaPods will support Swift soon)
So final score 2/7 on the Bone Test, although I’m sure by the time Swift goes GA a lot of them should be fixed.