(j3.2006) One of the proposals in 12-195 that didn't get out of subgroup

Van Snyder Van.Snyder
Wed Oct 31 18:01:38 EDT 2012


One of the proposals in 12-195 that didn't make it out of subgroup was
to replace <procedure-name> and <proc-component-ref> in <proc_target>
and <actual-arg> with <procedure-designator>.  This admits
<data-ref>%<binding-name> into procedure pointer assignment and as an
actual argument.

I have spoken with the colleague who asked for this, and gotten more
understanding of why he wants it.

He has a complicated decision procedure, to choose which type-bound
procedure to invoke.  He doesn't want this in his inner loop.  He'd like
to make the decision early, and record it either as a procedure pointer
assignment, or an argument association.  I suggested an index and a case
selector, but his profiling shows that has important, although not huge,
overhead.  He also objects to the additional code bulk.  I suggested
different dynamic types for the different cases, but he said that had
similar (actually a tiny bit more) overhead.

Can we revisit this in February, or is it permanently off the table?  It
seems like a trivial change both to the standard and within a processor.
Two syntax rules get shorter by one line each.  Processors already know
how to work out which procedure <data_ref>%<binding-name> denotes.  The
interface compatibility rules ought to be adequate, in the case of the
pointer or dummy argument having explicit interface (which wouldn't be
an unreasonable requirement if <data_ref> is polymorphic).  If not, a
few additional words might be necessary to deal with (or maybe prohibit)
a polymorphic <data-ref>.





More information about the J3 mailing list