(j3.2006) reduction routine

Malcolm Cohen malcolm
Thu May 20 22:06:50 EDT 2010


--------------------------------------------------
From: "Van Snyder" <Van.Snyder at jpl.nasa.gov>
Date: ?? 22?5?21? 10:09
To: "fortran standards email list for J3" <j3 at j3-fortran.org>
Subject: Re: (j3.2006) reduction routine

>
> On Thu, 2010-05-20 at 18:01 -0700, Malcolm Cohen wrote:
>> I certainly hope we're talking about an intrinsic reduction, or what
>> is the point of this discussion?
>
> Bill wanted to pass a specific that is automatically resolved from a
> generic operator(.myplus.).  That doesn't sound like an intrinsic
> reduction.

I was certainly under the impression that Bill's requirement was to be able to 
reduce ANY array by ANY available procedure or operation, generic or otherwise, 
intrinsic or otherwise.

(Maybe I was reading too much context into it, but it certainly looked like a 
future intrinsic facility - whether intrinsic procedure, or intrinsic module 
procedure, or syntax - and not just a plain ordinary programming question. 
Especially since we had previously talked about providing that as a future 
extension (maybe in the forthcoming coarray TR, or maybe not).)

Whether such a requirement is best satisfied by some extra syntax in Fortran or 
a plain procedural solution is, I hope, not predecided a priori.

Bill actually wrote:
> How would you actually specify the operation to the routine?

Which clearly has NOT prejudged the issue and demanded some new form of generic 
resolution.

Bill went on with:
> In the old days, one would have just passed the name of the procedure that 
> performs the operation as the actual argument.  In the new OOP world, all you 
> would know is a generic specifier or a symbolic operator name.

Right, and this is sufficient for the user to be able to write the trivial 
procedure that does exactly this - applies the generic spec to the actual 
arguments - and pass the name of that procedure to the reduction routine.  This 
is especially easy to do in F2008 since we can pass an internal procedure.

Problem solved, no language extension required.

(And if it was a plain programming question after all, then proposing future 
language extensions is not considered helpful by most of *my* users.  They don't 
want to have to wait 5-10 years to solve their problem!)

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo.
 




More information about the J3 mailing list