Re:Native GUI library for Go
by Alphasite_ on Friday June 06, 2014 @08:45AM
(#7857520)
And Objective-C isn't really strongly typed either, so you can send anything any message.
[ Parent
| on HN ]
FWIW this is specifically why Objective-C has been able to get by without generics for a while. You don't get solid type-checking like you do with generics in other languages (except C++), but that has never really been an issue because the above statement works even with [...] statements (sure, the compiler will warn you, but).
The only real issue is that the things you shove into Objective-C containers must themselves be Objective-C types, which means using NSNumber and NSValue everywhere for raw C types. The new Objective-C @literal and @(expression) syntax, however, should make such code cleaner in the future...