4 ms·
I think the gain is mostly that Swift allows you write code which more resistant to bugs than its ObjC counterpart would be. In Yaron Minsky's "Effective ML" t
by cellularmitosis 11y ago
I think the gain is mostly that Swift allows you write code which more resistant to bugs than its ObjC counterpart would be.
In Yaron Minsky's "Effective ML" talk, he mentions the idea of "Make illegal states unrepresentable": https://vimeo.com/14313378 https://vimeo.com/14313378
The combination of enums and non-optional variables allows you to get much closer to this ideal than you could with ObjC.
A great place to start would be the Functional Swift talks from 2014 and 2015: http://2014.funswiftconf.com/ http://2014.funswiftconf.com/ http://2015.funswiftconf.com/ http://2015.funswiftconf.com/
If you want to challenge yourself, try reading through the RxSwift codebase: https://github.com/ReactiveX/RxSwift https://github.com/ReactiveX/RxSwift