Log in
Sign up
See new Tweets

Conversation

This Tweet is unavailable. Learn more
Ken Ferry
@kongtomorrow
·
Jun 21, 2015
@brentsimmons
I think you're after "associated types". https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Generics.html#//apple_ref/doc/uid/TP40014097-CH26-ID189… Gist: https://gist.github.com/kongtomorrow/77c53e32ecf50b94f3c1…
1
1
Andy Matuschak
@andy_matuschak
·
Jun 21, 2015
@kongtomorrow
@brentsimmons
That requires making a 1-to-1 relationship between each `Smashable`-adopter and each `Value`-adopter
3
Andy Matuschak
@andy_matuschak
·
Jun 21, 2015
@kongtomorrow
@brentsimmons
Which can make for better diags + perf, but not necessary: https://gist.github.com/andymatuschak/a40c4c699c0abdd704ce…
1
Kyle S.
@optshiftk
·
Jun 21, 2015
@andy_matuschak
@kongtomorrow
@brentsimmons
Does that permit Brent’s use case, where it accepts one Value but returns a different one?
2
Andy Matuschak
@andy_matuschak
Replying to
@optshiftk
@optshiftk
@kongtomorrow
@brentsimmons
Yeah, see my comment.
6:19 PM · Jun 21, 2015·Tweetbot for Mac