News for hackers. Stuff that matters.
Re:What's Going Down at the Tiobe Index? Swift, Surprisingly by infinisil on Saturday April 27, 2019 @10:41PM (#19768964)
If you're doing so much casting you're doing something wrong. Swift's power comes from the type system, which alleviates the need for all casting in general. Instead of using a [String: Any] dictionary which bears no meaning at all, consider converting it to a struct with accessors of the right types. If you work with the type system, Swift will be a joy to use, because that's where it shines.
Re:What's Going Down at the Tiobe Index? Swift, Surprisingly by pixelrevision on Sunday April 28, 2019 @02:08AM (#19769629)
I’d agree with this completely. A lot of the people I see having issues with it are trying to write it like python or something. For this style of coding objective-c is a much better choice.
Re:What's Going Down at the Tiobe Index? Swift, Surprisingly by epynonymous on Sunday April 28, 2019 @08:24AM (#19770756)
also not sure why you were downvoted, i voted you back up.
Re:What's Going Down at the Tiobe Index? Swift, Surprisingly by epynonymous on Sunday April 28, 2019 @08:23AM (#19770753)
not sure why you were downvoted, i voted for your comment, makes perfect sense. i was using a generic [String: Any?] to hold a mix of variables, you are absolutely correct, should use a struct or maybe even a class.