[Swift-devel] folding/sequential-while/whatever and accessing data in files

Ben Clifford benc at hawaga.org.uk
Fri Sep 7 05:07:29 CDT 2007


One of the problems at the moment with implementing a 
fold/sequential-for/while loop is that I think a lot of the use cases want 
to make the termination condition be based on the output of the programs 
involved in the computation.

At the moment, there isn't a way to get data from 'file space' into 'swift 
expression space' so  something like this[1]:

iterate until error < 0.1 {
  next = make_a_new_approximation(previous);
  error = compute_error(next);
}

fails in the present system because 'error' is a file-like entity (being 
the output of the compute_error application) rather than a 
swift-value-like entity (which is held in memory and can be used in 
expressions)

I think mappers need to be made to address this.

[1] syntax that i made up specifically for this email and that I do not 
advocate for use.



More information about the Swift-devel mailing list