[J3] Fwd: [EXTERNAL] Re: Re: Slides available for your preview - Part 2 of the Generics Tutorial today at the J3 plenary
Van Snyder
van.snyder at sbcglobal.net
Tue Mar 9 23:09:24 UTC 2021
On Tue, 2021-03-09 at 22:24 +0000, Bill Long via J3 wrote:
> I’ve never heard Fortran criticized for lacking “generics”, but have
> often heard that the critical thing (in the minds of C++ programmers)
> missing in Fortran is templates.
Fortran's lack of "templates" isn't for lack of trying. Look at 04-
383r1.
As Bill Clodius has pointed out several times, template (or
parameterized) procedures aren't enough. One needs to be able to
combine procedures with the representations of their data. That's the
purpose for a template class, or a parameterized module. Read Wirth's
book "Algorithms + Data Structures = Programs."
If you have parameterized modules, there's no reason to bulk up the
language by providing parameterized procedures too. It just makes
teaching, and writing compilers, more complicated.
Fortran's lack of updaters, mentioned in a page that Bill Clodius
recently referenced, is also not for lack of trying. I tried in 1986
(for f90), shortly thereafter for f95, and for f2000. See page 38 of
97-114.
It seems that a great many things, that I proposed long ago, are
lamented as lacking, and cited as reasons not to use Fortran.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210309/3e3b015c/attachment.htm>
More information about the J3
mailing list