[J3] Thoughts on the semantics of generics
Van Snyder
van.snyder at jpl.nasa.gov
Wed Aug 8 23:55:24 EDT 2018
On Wed, 2018-08-08 at 20:43 -0600, William Clodius via J3 wrote:
> It is useful to define a uniform means of accessing the elements of a
> container termed an iterator.... it might be useful to allow a
> parallel access form, though the history of the FORALL construct is
> discouraging. Closely related to iterators are maps, filters, and
> comprehensions. Iterators and maps would often be simplified if
> Fortran included co-routines. My preference would be to have a
> specific way of defining iterators, an a relatively simple way of
> defining maps and filters.
Coroutines were briefly part of the work plan for Fortran 2008.
I wrote a proposal for coroutines and iterators in June 2010, cast as a
TS. I have prepared several revisions as a result of comments from J3
and WG5 members, and others. Coroutines and iterators have a long
history, including in CLU, Sather, C#, Java, and Python. Tasks and
protected objects in Ada are coroutines. This isn't new technology. If
done right, they are thread safe.
I'll revise my proposal again to include more justification for their
use, and put it on the J3 server under the generics and containers
rubric.
More information about the J3
mailing list