News for hackers. Stuff that matters.
Re:What makes code “Swifty”? by saagarjha on Sunday February 23, 2020 @05:39PM (#22400047)
The first three. Objective-C doesn't have enums with associated values and it's common to store things in heterogeneous collections or stringly-keyed collections. Creating protocols for generic constraints is also rare–informal protocols (respondsToSelector, anyone?) are instead quite prevalent. And Objective-C's "collection" APIs are much less powerful than Swift's: I might use a regex replacement instead of four calls to replacingOccurrences(of:with:), but it's the same principle.

There are no comments on this comment yet.