[Swift-devel] Problem using @extractint() on derived file

Ben Clifford benc at hawaga.org.uk
Wed Feb 25 03:45:32 CST 2009


On Tue, 24 Feb 2009, Michael Wilde wrote:

> substituting readData for @extractint in the above works as well.

ok good.

rambling slightly:

It would be nice to get rid of @extractint and have only readData, but I 
think that this doesn't work in all cases: readData's behaviour is 
controlled by the type that it is expected to return (that is, if you 
assign a readData expression to an int, it tries to read an int; if you 
assign it to an array, it tries to read an array). In some situations, 
that return type isn't well defined, because it could be a context where 
anything is accepted - for example what is the type of 
readData in: trace(readData(f))

-- 




More information about the Swift-devel mailing list