(j3.2006) question about generic resolution
Malcolm Cohen
malcolm
Wed Mar 24 04:33:00 EDT 2010
Aleksandar Donev wrote:
> On 3/23/2010 7:02 PM, Malcolm Cohen wrote:
>
>> Similar remarks suitably modified apply to the generic rule tweak too.
> I am not sure this is right---perhaps you can be more explicit.
You can program around it, and it is a similarly small amount of work to do so.
>> That is certainly not my experience. Even without CONTIGUOUS, I quite
>> frequently stumble across situations where there is a minor problem that the
>> "auto-targetting" feature would solve cleanly. I have never personally
>> wanted to disambiguate between POINTER and ALLOCATABLE in a generic
> I have. So has Van.
So? I wasn't doubting that for a moment, in fact I *explicitly wrote* that it
was "not useless".
> in fact, removing things in general should not be seen as a favorable way of
> fixing last-minute bugs.
Those are more words you are putting in my mouth quite wrongly.
I did not set out to remove it. That was an unfortunate *CONSEQUENCE* of the
most obvious (and cleanest) way of fixing the ambiguity, and arises solely
because (regardless of how useful or useless anyone finds it) it is essentially
a trivial feature, a mere *tweak* to the generic ambiguity rules.
You are the first and only one to suggest removing it *in haste*.
> I recall TYPEDEF here. It was removed in haste at the last minute
That is not an accurate depiction of events, and it was not removed "in haste at
the last minute" but following a country comment on the CD ballot, not even the
FCD ballot. Here we have already passed the FCD ballot stage, so we are two
stages later.
...
> The typedef-like feature probably has more uses than any of the ones we are
> discussing now...
You can claim that, but that one was voted down when it came up again i.e. we
decided by majority vote that the standard was better without the feature. I
see no productive point in dragging a semblance of a red herring across this
discussion either.
>> As I wrote, the conflict is fundamental. Our choices are limited to
>> effectively removing one or the other feature, or introducing a "priority"
>> scheme to disambiguate this case.
> How about this option: The auto-targetting feature does not work with generic
> resolution, that is, the magic of pointing the dummy to the actual only
> happens if the call is non-generic. Otherwise, the actual must be a pointer.
> Or some variant thereof. I am not yet convinced the conflict is "fundamental".
Wow, that is pretty fundamental: auto-targetting shouldn't even work at all with
generics, huh!? Not just with this particular generic subfeature (ptr-vs-alloc)
but *ANY* generic. One might consider that to be an extreme version of a
"priority" scheme, but anyway I certainly think it is nastier than the options I
listed.
Cheers,
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list