From owner-sc22wg5@open-std.org  Mon Dec  6 14:41:48 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 60428C3BA1C; Mon,  6 Dec 2010 14:41:48 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from smtp.cims.nyu.edu (SMTP.CIMS.NYU.EDU [128.122.49.100])
	by www2.open-std.org (Postfix) with ESMTP id BFEF7C178E4
	for <sc22wg5@open-std.org>; Mon,  6 Dec 2010 14:41:46 +0100 (CET)
Received: from [192.168.1.2] (pool-108-27-16-195.nycmny.fios.verizon.net [108.27.16.195])
	(authenticated bits=0)
	by smtp.cims.nyu.edu (8.14.3/8.13.8) with ESMTP id oB6Dfimt008455
	(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT)
	for <sc22wg5@open-std.org>; Mon, 6 Dec 2010 08:41:45 -0500 (EST)
Message-ID: <4CFCE81A.8090408@courant.nyu.edu>
Date: Mon, 06 Dec 2010 08:41:46 -0500
From: Aleksandar Donev <donev@courant.nyu.edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6
MIME-Version: 1.0
To: SC22WG5 <sc22wg5@open-std.org>
Subject: Re: (j3.2006) (SC22WG5.4368) [ukfortran] WG5 informal ballot re	Interop.
 TR
References: <20101108175805.5B97EC178E5@www2.open-std.org> <20101206103130.1AE8AC178E3@www2.open-std.org>
In-Reply-To: <20101206103130.1AE8AC178E3@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

On 12/6/2010 5:31 AM, Malcolm Cohen wrote:

> Inclusion of the type field in the descriptor
> should probably be reconsidered.
I in principle agree but I also deel that going around in circles and 
never converging should be avoided.

> A reasonable alternative would be to
> forbid passing TYPE(*) actuals to TYPE(*) dummies.
This is too drastic. We want to disallow TYPE(*) assumed-shape or 
explicit-shape dummies (that is, ones that do not carry a descriptor) to 
be passed as actuals for TYPE(*) dummies. That way, we ensure that type 
information is always present. One can still write wrappers in Fortran 
that have TYPE(*) dummies, but they will always be assumed rank. C 
routines on the other hand can avoid descriptors, but can also rely on 
having type information.

Does this seem acceptable?

> If we go for the "forbid" route, I hope
> that we can pass CLASS(*) actuals to TYPE(*) dummies - and that if this
> ends up in a C descriptor that the descriptor fields "type" (if we keep
> that) and "elem_size" (and "length" if we get that) are set
> appropriately. In fact I think we can do that anyway as the TR stands.
Yes, CLASS(*) or in fact any polymorphic thingo that already carries a 
hidden type descriptor could be allowed as an actual argument 
corresponding to a TYPE(*) dummy. But we need to decide this and put it 
in writing in the TR.

Best,
Aleks

-- 
Aleksandar Donev, Assistant Professor of Mathematics
Courant Institute of Mathematical Sciences
Office: 909 Warren Weaver Hall, New York University
E-mail: donev@courant.nyu.edu
Phone: (212) 992-7315; Fax: (212) 995-4121
Mailing address: 251 Mercer St, New York, NY 10012
Web: http://cims.nyu.edu/~donev
