[Swift-devel] Re: restart variable scoping.

Ben Clifford benc at hawaga.org.uk
Fri May 23 09:24:28 CDT 2008


On Fri, 23 May 2008, Mihael Hategan wrote:

> > If you use the iteration index, that is always a basic type.
> 
> Ah, right. We only allow arrays to be indexed by integers. I see.

yes.

If we were to index an array by something like a string (or a float, or 
the tuple types that we talk of sometimes), then I think the same 
arguments apply though - it can be 'written down' and 'read in' in a sane 
fashion.
 
Using types such as files that have no in-runtime value would cause 
problems for arrays in general, not just for restart, in as much as they 
don't have something like a .equals() to meaningfully use when picking 
elements of an array using the [] operator (aside from something like 
comparing the files byte-for-byte, which seems excessive).

-- 



More information about the Swift-devel mailing list