To: J3 J3/18-156 From: Steve Lionel & Bill Long & Dan Nagle & Lorri Menard Subject: J3 initial recommendations for F202X features Date: 2018-February-26 Reference: N2147, 18-122r1, minutes215.txt Introduction ------------ At its February 2018 meeting, J3 made a first pass over a long list of suggestions for new features in the next Fortran standard revision (working title Fortran 202X). The user survey run since last summer, and summarized in WG5 document N2147, provided the bulk of suggestions, along with relative ranking of selected features. Some J3 members offered their own suggestions as well. From the user survey, as well as general sentiment on the committee, it was clear that two major features were considered to be of very high value: - Generic programming or templates - Exceptions Multiple papers on these ideas have been submitted over the years - recent instances are 18-108, 18-109, 18-112, 18-115, and 18-116. J3 members in attendance were asked to submit a list of up to five features, other than generics and exceptions, with use cases where applicable. These were compiled into paper 18-122r1. The items were divided among the Data, HPC and JoR subgroups; the subgroups considered each suggestion and recommended priorities for each. J3 as a whole then met and took straw votes on each item as to whether to recommend further development of the feature. This paper details the suggestions recommended for consideration by WG5. Note that feature specifics (syntax, etc.) are generally left unspecified; if a feature is accepted by WG5 details will be developed by J3 from use-cases and the resulting feature may vary from any specific proposal here. A brief note regarding the popular suggestion of "containers" (see N2147, 18-110r1, 18-123) - there was general agreement the position expressed in 18-142, "Data subgroup believes that it would be better to have standard features in Fortran that will allow developers to create general or specific container objects.", was the preferred direction. Recommended Feature List ------------------------ J3 recommends to WG5 that the following features be included in Fortran 202X. References to J3 papers are given where available. Numbers in parentheses, such as (3), indicate support from multiple members. Straw votes, where taken, are shown. Major features Generic programming or templates No straw vote: Forward 18-142 as J3 recommendation on Containers Note that Generics from Van Snyder (Ada feature) and Templates (modeled on C++) are quite different. 18-108 Generic (Clune) 18-112 Generic (Snyder) 18-116 Templates (Long) Exceptions No straw vote. 18-109 Error Handling (Clune) 18-115 Exceptions (Van) 94-254r4 Exceptions (Reid) BCS17b.pdf Exceptions (Reid) Approved for more work: ----------------------- Medium/Large - Bit strings (Y:8, N:0, U:4) In general, the BITS feature that was stripped from F2008 toward the end of development. Needs a paper with old design citations and use cases. Could replace unsigned integers, and also solve the real/complex problem (see 18-128). Medium/Large - New types, not type aliases, from existing types (Y:8, N:1, U:4) 18-113r1 Medium/Large - Proper enumerated types; Type system affected. Possibly a bind(c) feature? (Y:6, N:0, U:4) 18-114r1 Medium - Asynchronous subroutine execution with event post on completion (Y:8, N:0, U:5) 18-125 Work to do: Need alternative to EVENT WAIT. Race conditions - need edits like ASYNCHRONOUS for I/O Van wants other models for this more like Ada. How related to OMP tasks? Medium - (2)An ability to declare a reduction variable on DO CONCURRENT. (Y:7, N:0, U:3) 18-143 Medium - Put with Notify (Y:6, N:0, U:6) 18-117r1 Medium/Small - (3)Specifying default values for optional dummy arguments that are omitted (Y:6, N:4, U:2) 18-136r1 Extensive discussion about unwanted effects on scoping rules and possible conflicts with SAVE. Most agreed that if the caller provided an anonymous writable temporary, in the same manner as VALUE for non-BIND(C) procedures, that most if not all problems would be avoided. For syntax consider =value in the dummy argument list, rather than overloading initializers, though there is no semantic ambiguity. Medium/Small - Protected structure components (Y:7, N:0, U:3) 18-146 Small - User control of the optional leading zero in F/E format (18-120) (Y:9, N:0, U:4) 18-120r3 Small - Degree trigonometric functions (Y:9, N:0, U:1) 18-139r1 Already implemented by several vendors. Small - Significantly increase free-form line length (Y:10, N:0, U:3) 18-124 Work to do: Refocus on allowing longer total statement length with more continuation lines an option. Small - A0 format that trims whitespace from right of strings (Y:7, N:0, U:6) 18-126r1 Small - Short-circuit logical operators (Y:8, N:0, U:2) 18-152 Small - More CHARACTER intrinsics (delimiter processing, perhaps?) (Y:7, N:1, U:5) 18-127 Work to do: Concern about name conflicts with existing user procedures Aimed at deletion of Part 2. List needs to be narrowed, removing more trivial functions. Small - Allow deferred-length allocatable char vars for messages, intrinsics that return strings (Y:10, N:2, U:1) for errmsg and iomsg specifiers (Y:7: N:0, U:6) for intrinsics that return strings other than error messages (Y:7, N:0, U:6) for write to internal files 18-130 Small- A VIRTUOUS (superpure) procedure prefix that declares the procedure does not access data outside of the procedure. (Y:5, N:0, U:5) 18-151 Small - Syntax to specify that the target of a dummy argument pointer is not to be changed (INTENT applies to the pointer, not its target) (Y:7, N:0, U:3) 18-144 Small - An INTENT syntax that means the same as not specifying INTENT (Y:7, N:2, U:3) 18-150 Small - add LOG8, LOG16, LOG32, LOG64, and REAL16 to iso_fortran_env (Y:10, N:0, U:2) 18-148 Originally: Remove requirement that LOGICAL requires one numeric storage unit Small - CFI function to return text version of a processor's CFI error code (Y:10, N:0, U:2) 18-145 Small - Binary compatibility of C descriptors so that a single C library could work with multiple Fortran implementations (Y:11, N:0, U:1) Needs more work and a solid design. Concept popular, though. Maybe look at additional CFI routines rather than breaking descriptor compatibility Small - Providing methods for easily accepting NUL-terminated strings in calls to Fortran from C. (Y:7, N:0, U:5) 18-147 Current design involves conversion intrinsics. Small - POINTERs initially null instead of undefined (Y:6, N:3, U:1) 18-140 Undecided: ---------- Undecided, Small - += and *= syntax No paper or Vote. JoR rated this low priority. Undecided - Constructors - procedure called automatically when a derived type comes into existence. No vote or paper. Undecided - Allowing a specification section in (some) constructs without forcing use of BLOCK/END BLOCK seems useful. No paper. Defer discussion to next meeting. Undecided - Allow arrays and allocatables with coarray components. Continue discussion at the next meeting. No vote. 17-200r1 --END--