4 ms·
Full disclaimer, Swift is my favourite language by a long shot and I'd love to use it everywhere, but it really is very complicated in some places. Consider, f
by borland 9y ago
Full disclaimer, Swift is my favourite language by a long shot and I'd love to use it everywhere, but it really is very complicated in some places.
Consider, for example, the interaction between generics in structs and classes, and protocols with associated types, and why you have to make stupid type-erasing wrappers like 'AnyObject' and so forth.
JS barely even has types at all, let alone generics. There's a lot less to go wrong there :-)
- phatbyte 9y agoI'm with you on Swift as well, beautiful language. But regarding JS, nobody these days write vanilla JS, most of devs are either using ES6 or TypeScript(which supports types and generics).
- fenwick67 9y agoI'm being a bit pedantic, but ES6 is vanilla JS.
- scrumper 9y agoA good point, won't argue with you. But, at the risk of moving the conversational goalposts, I was thinking about the whole developer experience as much as just the language itself. With Swift, you can live entirely within Apple's frameworks and libraries and be immensely productive. With JS you're going through an entire exercise of flavor and framework selection before you can start writing any code; and those decisions have a massive impact on your app's fundamental design. That's as much what I meant by complexity.