With the latest LFortran (022dbc29) you can now play with a prototype implementation of the Fortran generics. Here is a demo file that you can try:
You can copy & paste that example into https://dev.lfortran.org/ and it will work:
You can also test it locally:
$ lfortran integration_tests/template_add.f90
The result is 1.22999992e+01
The result is 14
@tom_clune, @everythingfunctional, @gak, @FortranFan and others, can you please test it out and provide feedback?
LFortran itself is alpha, and the generics are a prototype. Please report any bugs that you discover into issues: Issues · lfortran/lfortran · GitHub, just open up a new one.
Also, we quite urgently need more examples, if the generics subcommittee could create more examples or tests that we could use, that would be awesome.
Many thanks to Oshanath, Luthfan, Ubaid and many others for implementing the initial prototype and making it working locally as well as online. Special thanks to Magne for helping us design it in the compiler.