From owner-sc22wg5@open-std.org  Tue Dec  9 14:45:07 2008
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom7
Delivered-To: sc22wg5-dom7@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id CD6D1CA343D; Tue,  9 Dec 2008 14:45:07 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from mailrelay1.lrz-muenchen.de (mailrelay1.lrz-muenchen.de [129.187.254.106])
	by www2.open-std.org (Postfix) with ESMTP id 339EDC178E5
	for <sc22wg5@open-std.org>; Tue,  9 Dec 2008 14:45:05 +0100 (CET)
Received: from [129.187.48.233] ([129.187.48.233] [129.187.48.233]) by mailout.lrz-muenchen.de with ESMTP; Tue, 9 Dec 2008 14:44:46 +0100
Message-Id: <493E764F.8020301@lrz.de>
Date: Tue, 09 Dec 2008 14:44:47 +0100
From: Reinhold Bader <Reinhold.Bader@lrz.de>
User-Agent: Thunderbird 2.0.0.17 (X11/20080922)
MIME-Version: 1.0
To: sc22wg5@open-std.org
Subject: Re: (j3.2006) (SC22WG5.3787) N1761, TYPE(*), BIND(C) and arrays
References: <20081127193527.EF00DC178D9@www2.open-std.org>	<20081202130345.82E16C178E1@www2.open-std.org> <20081209122438.AE57DCA3439@www2.open-std.org>
In-Reply-To: <20081209122438.AE57DCA3439@www2.open-std.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Sender: owner-sc22wg5@open-std.org
Precedence: bulk



It appears to me that if non-interoperable arguments are to be allowed,
it will be necessary to include interoperability among the
characteristics of the dummy arguments if a clean, extensible
design is favored.

This would probably also mesh nicely with the concept of creating
mapped (as opposed to matching) interfaces in case at least one
of the arguments is non-interoperable. And it would cover the
problematic case of a scalar non-interoperable entity as well.

Of course, for the TR many limitations can be imposed on what kinds
of non-interoperable entities are allowed. In particular I agree that
additional restrictions will be needed for TYPE(*) dummies in BIND(C)
interfaces to prevent accidents from happening to the poor C programs
who are being served monsters and non-monsters in turn to the same
interface, within the same program.

N.M. Maclaren schrieb:
> This is something that I subconsciously realised when reading N1761,
> but only formulated what it was fairly recently.  Fortran does not have
> the concept of a called procedure knowing anything about the properties
> of its actual arguments (i.e. the objects and expressions in the calling
> procedure).  The SOLE information available to a called procedure about
> its arguments are in its OWN declaration (i.e. the properties of its
> dummy arguments).
> 
> It overlaps with Reinhold's points to a considerable extent, of course.
> 
> That makes TYPE(*) effectively non-interoperable with the proposal to
> have two incompatible argument passing mechanisms for BIND(C), which
> are selected solely on the types of argument.
> 
[...]
