[Swift-devel] Associative arrays: foreach index issue.
Mihael Hategan
hategan at mcs.anl.gov
Fri Jun 24 14:51:28 CDT 2011
On Fri, 2011-06-24 at 21:30 +0200, Ben Clifford wrote:
> >
> > int array[string].
>
> agree.
>
> (Part of my justification: conceptually (even if it is never
> implemented) any data type that has a sensible equality relation can
> be used as an index. Other examples are booleans, and structs composed
> of other types with equality.)
Right. I was thinking about that and I believe it's straightforward to
implement equality for structs. In one of the m/r "translations" i was
talking about earlier there was a need for a struct key.
More information about the Swift-devel
mailing list