[swift-evolution] [Idea] Generic subscripts
swift-evolution at haravikk.me
Wed Aug 3 12:37:14 CDT 2016
> * Who is interested in this feature?
Me definitely, everyone probably.
> * Should it be severed from throwing subscripts?
That depends I guess; subscripts are basically functions anyway so it didn't make a lot of sense to me that they lacked features that functions have, so if implementing both of these features is basically just a case of linking up the same behaviour from functions then I say do them simultaneously if possible. I don't know much about the actual implementation details though so obviously someone else should make a final decision ;)
Basically I'm in favour making subscripts have as much in common with functions as possible; in fact they really should just be a property-like shorthand for a regular function behind the scenes.
More information about the swift-evolution