Re:Building a Production Server Swift App
by Apocryphon on Monday December 19, 2016 @12:49PM
(#13213313)
Interesting. Do you think Swift isn't as good a language as Objective-C? Or a headache in what way?
[ Parent
| on HN ]
Re:Building a Production Server Swift App
by codesternews on Monday December 19, 2016 @01:11PM
(#13213512)
No Swift is great language and I did not like Objective-C. The headache in the sense compilation time and also shitty errors come and you do not know what that means.
It's type safe language but all the type safety comes with price and some time the code written is just sucks. Json parsing is one example of this. All the casting and all that really make code horrible.
In swift 3 they made all value types to Any and in iOS communicating between Cocoa frameworks become a really mess as all expect some objc type etc. Implicit conversion is also removed and now you have to cast String to NSString and I really mad about this my code now looks horrible huh....
Re:Building a Production Server Swift App
by rudedogg on Monday December 19, 2016 @06:14PM
(#13215857)
String bridges to NSString, are you sure you need to cast?
I think String now is part of Any and NSString still is AnyObject. You need to cast, but the cast will always succeed.