Re: communicating the name of a function to deep within the call tree
- From: "James Giles" <jamesgiles@xxxxxxxxxxxxxxxx>
- Date: Mon, 09 Jul 2007 01:57:05 GMT
glen herrmannsfeldt wrote:
James Giles wrote:....
This is
clearly the result Phillip Helbig wants (with or without
clothes). If you redeclare the primaries within long_expression
this expression produces the correct result for whatever
new type and KIND of that expression. And it remains
legibly correct.
That is a good reason for writing it that way. Still, there is
the algebra tradition of writing coefficients first. Also,
it separates parts of two thirds, unless it really isn't two thirds.
I don't consider that to be as important as the ability to write
expressions that are generic with respect to their operands.
If Fortran had RATIONAL as a data type, and had Common
Lisp's rule of mixed-mode operation, we could both have
what we want:
(2/3)*(long_expression) ! doesn't work in Fortran
Short of that however, if I want to write code defensively
so that future changes of type and precision are easy, I need
to use what capabilities the language has. Further, we may
eventually have real generic programming features in
Fortran. If you insist on a style that requires syntactic
changes to expressions within the code when the types
of the dummy arguments change, that pretty much destroys
generic programming.
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
.
- References:
- communicating the name of a function to deep within the call tree
- From: Phillip Helbig---remove CLOTHES to reply
- Re: communicating the name of a function to deep within the call tree
- From: James Giles
- Re: communicating the name of a function to deep within the call tree
- From: Phillip Helbig---remove CLOTHES to reply
- Re: communicating the name of a function to deep within the call tree
- From: James Giles
- Re: communicating the name of a function to deep within the call tree
- From: Phillip Helbig---remove CLOTHES to reply
- Re: communicating the name of a function to deep within the call tree
- From: James Giles
- Re: communicating the name of a function to deep within the call tree
- From: glen herrmannsfeldt
- Re: communicating the name of a function to deep within the call tree
- From: James Giles
- Re: communicating the name of a function to deep within the call tree
- From: glen herrmannsfeldt
- communicating the name of a function to deep within the call tree
- Prev by Date: Re: communicating the name of a function to deep within the call tree
- Next by Date: Re: How old is the average Fortran programmer?
- Previous by thread: Re: communicating the name of a function to deep within the call tree
- Next by thread: Re: communicating the name of a function to deep within the call tree
- Index(es):
Relevant Pages
|