Skip to content

Instantly share code, notes, and snippets.

@andyarvanitis
Created January 15, 2013 07:07
Show Gist options
  • Select an option

  • Save andyarvanitis/4536807 to your computer and use it in GitHub Desktop.

Select an option

Save andyarvanitis/4536807 to your computer and use it in GitHub Desktop.
Eero supports (as an experimental feature) 'instancetype' for method parameter types. Inspired by Jonathan Sterling's blog: http://www.jonmsterling.com/posts/2012-02-05-typed-collections-with-self-types-in-objective-c.html
protocol OrderedCollection <FastEnumeration>
at: UInteger index, return instancetype
put: instancetype object
end
protocol MapCollection <FastEnumeration>
at: id key, return instancetype
put: instancetype object, at: id key
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment