From owner-sc22wg5@open-std.org  Wed Jul 28 07:25:44 2010
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id 1A343C3BA06; Wed, 28 Jul 2010 07:25:44 +0200 (CEST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
X-Greylist: delayed 1458 seconds by postgrey-1.18 at www2.open-std.org; Wed, 28 Jul 2010 07:25:42 CEST
Received: from mail-yw0-f47.google.com (mail-yw0-f47.google.com [209.85.213.47])
	by www2.open-std.org (Postfix) with ESMTP id 9F5CCC3BA01
	for <sc22wg5@open-std.org>; Wed, 28 Jul 2010 07:25:41 +0200 (CEST)
Received: by ywe9 with SMTP id 9so927143ywe.34
        for <sc22wg5@open-std.org>; Tue, 27 Jul 2010 22:25:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from
         :user-agent:mime-version:to:subject:references:in-reply-to
         :content-type:content-transfer-encoding;
        bh=H8drlakn96s92nHENSelZ0WP+tHbNCorA/7eFC5YRDY=;
        b=lDfz1yb/XtmJoSrMeCUmZOu5tLSET5yAxXzRkLxGMZtFUj7iccvMErYsmBMKydgMXS
         rIfsUydk/It9FvqYx1U5U/pOhAtq76KTwIvQu9C7hrTIsaR0eh+ADlxO8O+ufZ4xTyTQ
         zHrRjunKi0ncglIsPrEo5qCxm0+110ihNgVf8=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:user-agent:mime-version:to:subject:references
         :in-reply-to:content-type:content-transfer-encoding;
        b=EK19SLxlj7zMhiWCnjr6xeu4Mqq40hF+64YUUevxQ35SiL8TVMsT0z/iLMfmYa7cnS
         Ctd0yqgT+LBSDmql5uQsouilyIHUuziZIF7he0iKwbyc1u8xG6X8/674CunSlKd3/6RE
         tpksfYqtwdTpWcvrmgKErXY7ltyvgTy7R2FpU=
Received: by 10.100.137.6 with SMTP id k6mr10956747and.146.1280292888727;
        Tue, 27 Jul 2010 21:54:48 -0700 (PDT)
Received: from [192.168.1.3] (ucomdsl-209-203-172-26.ucom.net [209.203.172.26])
        by mx.google.com with ESMTPS id q7sm9945711anf.6.2010.07.27.21.54.47
        (version=SSLv3 cipher=RC4-MD5);
        Tue, 27 Jul 2010 21:54:47 -0700 (PDT)
Message-ID: <4C4FB816.7040207@courant.nyu.edu>
Date: Tue, 27 Jul 2010 21:54:46 -0700
From: Aleksandar Donev <aleks.donev@gmail.com>
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
To: sc22wg5@open-std.org
Subject: Re: (j3.2006) (SC22WG5.4302) Executing a type-bound procedure on
 a	coindexed object
References: <20100725204840.C4C81C178E6@www2.open-std.org>
In-Reply-To: <20100725204840.C4C81C178E6@www2.open-std.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Reinhold.Bader@lrz.de wrote:

> NOTE 12.16 of the draft 2008 standard appears to imply that a type-bound
> procedure may be invoked on a polymorphic coindexed object:
> 
> "When resolving type-bound procedure references, constraints on the use of
> coindexed objects ensure that
> the coindexed object (on the remote image) has the same dynamic type as
> the corresponding object on the
> local image. Thus a processor can resolve the type-bound procedure using
> the coarray variable on its own
> image and pass the coindexed object as the actual argument."
> 
> However, according to 12.5.2.4, para 2:
> 
> "The dummy argument shall be type compatible with the actual argument. If
> the actual argument is a polymorphic
> coindexed object, the dummy argument shall not be polymorphic."
> 
> Considering that the passed argument dummy is required to be polymorphic
> (at least in case the type is extensible), this restriction appears to
> contradict the implication of the NOTE.
I am on the road and do not have the resources (including the standard) 
for a careful study, so I am speaking from memory and intuition about 
what we intended. I believe the above prohibition was put there because 
of the need to copy unknown stuff (e.g., added components) from a remote 
object into a local copy. I recall Jim (IBM) complained about this as it 
requires some nontrivial work to also keep dynamic tables in sync across 
images or some such. So it is possible we added the restriction a while 
after the note. Perhaps John or Bill can be of more help in digging some 
history out.
Interesting question though!
Aleks


-- 
Aleksandar Donev
Assistant Professor of Mathematics
Courant Institute of Mathematical Sciences, New York University
E-mail: donev@courant.nyu.edu
Phone: (510) 910-0891
Address: 251 Mercer St, New York, NY 10012
Web: http://cims.nyu.edu/~donev/
