Found 5 bookmarks
Newest
Swift Generics Evolution - don’t panic
Swift Generics Evolution - don’t panic
it’s reassuring to know that the folks driving changes in Swift have a solid background in language design, and that they’re thinking about all manner of hard problems in order to make our lives easier. However, it makes me worry that people might be missing out on a truly exciting conversation about what might be coming in a future Swift version. The reason for the label “reverse generics” is that the flow of information is backwards from the existing system. Where right now, the caller binds generic types as it calls a function, the proposal would have the function itself bind the return types and pass concrete values back out.
·timekl.com·
Swift Generics Evolution - don’t panic
History: Why does closure syntax use the keyword `in`?
History: Why does closure syntax use the keyword `in`?
It's my fault, sorry. In the early days of Swift, we had a closure syntax that was very similar to traditional Javascript, func (arg: Type, arg: Type) -> Return { ... }. While this is nice and regular syntax, it is of course also very bulky and awkward if you're trying to support expressive functional APIs, such as map/filter on collections, or if you want libraries to be able to provide closure-based APIs that feel like extensions of the language. Our earliest adopters at Apple complained about...
·forums.swift.org·
History: Why does closure syntax use the keyword `in`?
On labeled tuples versus structs
On labeled tuples versus structs
“@jckarter @Javi @mdiep The space of things that are typey enough to need labels but not typey enough to get a name and call a struct is pretty small.”
·mobile.twitter.com·
On labeled tuples versus structs