Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Swift, Apple's days-old intended replacement for Objective-C, does have generics.


Isn't it about time? I mean, they don't really have to make a brand new language to add generics.


As mentioned elsewhere, Objective-C is mostly dynamically typed, and you can just silently cast id to things, so it doesn't need generics as much as a language like Go, although they certainly could be useful. On the other hand, the dynamic typing makes it slow with generics or not, and if you want to put numbers in collections, you have to go through a very cumbersome boxing process - two of the many things only a new language could resolve.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: