3 ms·
>implicitly unwrapped optionals This only exists for objective-c introp, and the creators are actively trying to find ways to get rid of it. On the other hand,
by danappelxx 11y ago
>implicitly unwrapped optionals
This only exists for objective-c introp, and the creators are actively trying to find ways to get rid of it. On the other hand, in nearly every other language, all pointers would be considered implicitly unwrapped optionals, while in Swift you get optionals built in (food for thought).
>awkward syntax where you need exclamation marks all
Oh come on, syntax does not define a language. If they used a different character or an operator, would you be more happy? Either way, it does take some getting used to but eventually it feels natural.
>insanely complicated use of enumerations
What?! This is one of my favorite features! You can represent so many things with an enum and it can make your code much safer. My favorite two examples are representing JSON as an enum, and the fact that Swift's Optional is actually just an enum with cases .none and .some(T).
>basic string operations such as doing a substring are unnecessarily complicated and verbose
I somewhat agree with you on this. They have their reasons (mostly because strings can have varying sizes, so indexing a utf8 string, for example, can give unexpected results) but I still wish they did something about it.