[swift-evolution] [RFC] New collections model: collections advance indices

Dmitri Gribenko gribozavr at gmail.com
Mon Mar 7 19:25:41 CST 2016


Hi,

What does everyone think about requiring indices to conform to
Hashable, in addition to the existing requirements for Equatable and
Comparable?

I don't think this should limit any viable collection designs, and yet
might be useful, for example, to store indices in a set.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-evolution mailing list