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

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


On Tue, 24 Feb 2009, Michael Wilde wrote:

> > extractint probably should be able to take a file parameter, rather than a
> > string, and order evaluation properly.
> 
> extractint(f) seems to work:

[...]

> I was confused about what each expected, so perhaps just clarifying the users
> guide is whats needed.

It would be nice if you got some kind of warning here.

The approach that I think is most in-sync with other file handling in 
Swift would be to say that you could not pass a filename into readData; 
instead you would be compelled to pass a mapped file (as you ended up 
doing in this case).

That would increase the volume of text needed when using the present 'pass 
in a filename' behaviour; but in some ways, its a simplification because 
it strengthens the rule "if you want to deal with a file, you must do it 
by mapping to a variable, not by passing its filename around".

I'm unsure. Right this second I think I'd prefer that change to be made.

-- 




More information about the Swift-devel mailing list