Generics Proposal for 202Y video call

I would like to organize a meeting to make further progress on generics. Anybody who is interested, please note your times here:

I will announce Tuesday morning when we can do it. Our current status is here:

and if there is interest, I would be happy to do a video call every week to make steady progress on this.

1 Like

Let’s do Thursday 1pm-2pm Pacific Time. All 6 people who responded to the poll have time.

@milancurcic would you mind please posting here a Zoom link? If I do it, it will be limited to 40 min.

1 Like

Milan Curcic is inviting you to a scheduled Zoom meeting.

Topic: Discuss generics for Fortran 202Y
Time: Oct 22, 2020 01:00 PM Pacific Time (US and Canada)

Join Zoom Meeting

Meeting ID: 985 0752 2323
Passcode: 437749
One tap mobile
+16465588656,98507522323#,0#,437749# US (New York)

Dial by your location
+1 646 558 8656 US (New York)
+39 069 480 6488 Italy
+39 020 066 7245 Italy
+39 021 241 28 823 Italy
Meeting ID: 985 0752 2323
Passcode: 437749
Find your local number:

Join by SIP

Join by H.323 (US West) (US East) (Amsterdam Netherlands) (Germany) (Australia) (Brazil) (Canada)
Meeting ID: 985 0752 2323
Passcode: 437749

1 Like

Thank you Milan. I sent a Calendar invite to everybody who responded to the poll. Anybody is invited to join (even if you didn’t respond to the poll).

We can use this thread to note down what we want to discuss.

I plan to create a comparison of examples in Go (the proposal there), C++, Rust and a preliminary syntax for Fortran. And at the video call use these to discuss the alternatives that we have on the table and pros / cons of each.

I would like to mainly concentrate on the general template mechanism (plus concepts) for this phone call. After we have a good path forward on this, we should later also discuss how the templates play with multidimensional arrays (the current discussion at the J3 mailinglist) and at

At the phone call today I would like to propose that we need to push in 3 areas:

and then discuss the PRs #16 and #14/#15.

1 Like

@certik sorry I won’t join today, down with a headache. Will come in just to assign you as a host.

Thank you everybody who attended, we had I believe 10 participants. Here is a summary:

  • The above 3 areas are good, the last bullet point should be generalized to other corner cases and “warts” in Fortran, although the rank agnostic arrays is definitely one of the main ones

  • We should prototype the Fortran pseudocode for the second bullet point above using the abstract class in Fortran and we need to answer exactly how the templates+concepts differ from the abstract class: templates are strictly compile time and allow an effective multiple inheritance.

  • For the second bullet point should be extended with multiple templates / constraints to see how it looks like

  • @everythingfunctional will contribute a Haskell example of strong concepts for the second bullet point

  • We need to figure out how parametrized modules Fortran proposal fits into this, whether it is one possible implementation of the “strong concept” idea, or something else.

  • We should find a better terminology for templates + strong concepts. Such as type parameters and constraints/traits.

  • Rust requires to explicitly specify that a user type is satisfying a trait, Go does not. We seemed to agree we should go the Go route, which seems to be natural for users. The reason Rust does it is so that you can append more methods to a class outside where it is defined, but in Fortran (as in Go I believe), you define everything at one place, so it seems more natural to satisfy the traint/concept/constraint implicitly.

  • We should make progress on the above 3 areas as much as we can. As we make further progress, the effort will serve as a “prototype” that allows people to have a concrete idea about how the generics could be done and allows them to reason about the various proposal. From there we need to then write down use cases and requirements for generics. And then there will be multiple proposals how they could be implemented, using the ideas from our “prototype” (or other ideas).

  • As we make progress, we need to think how to get the whole J3 committee up to speed with the “strong concept” and other ideas, and convince them this is a good “requirement” that the compiler checks both the library code and a user code. And other ideas that we figure out in the Generics subgroup.

  • We will meet every other week for 1h.

If I missed anything, please let me know.


We had a smaller phone call today, I posted the summary here:

1 Like