From owner-sc22wg5@open-std.org  Tue Dec  9 07:40:42 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 AB6CACA5FE0; Tue,  9 Dec 2008 07:40:42 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from nspiron-2.llnl.gov (nspiron-2.llnl.gov [128.115.41.82])
	by www2.open-std.org (Postfix) with ESMTP id E6474CA343D
	for <sc22wg5@open-std.org>; Tue,  9 Dec 2008 07:40:41 +0100 (CET)
X-Attachments: None
Received: from vpna-user-128-15-244-34.llnl.gov (HELO [128.15.244.34]) ([128.15.244.34])
  by nspiron-2.llnl.gov with ESMTP; 08 Dec 2008 22:40:39 -0800
Message-ID: <493E12E7.901@llnl.gov>
Date: Mon, 08 Dec 2008 22:40:39 -0800
From: Aleksandar Donev <donev1@llnl.gov>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071009 SeaMonkey/1.1.5
MIME-Version: 1.0
Cc: "WG5, " <sc22wg5@open-std.org>
Subject: Re: (j3.2006) (SC22WG5.3774)   Response on the TR29113 draft N1761
References: <20081207203535.92039C178D6@www2.open-std.org>	<20081208183121.F21E4C178E4@www2.open-std.org> <20081208213905.270C8C178D6@www2.open-std.org>
In-Reply-To: <20081208213905.270C8C178D6@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 wrote:

> I intuitively 
> followed the otherwise valid
> rule that a CLASS(x) actual cannot ever be matched do a TYPE(x) dummy in 
> formulating my issue.
Except that "*" is not "x", it is a special case, even for CLASS(*) vs 
CLASS(t) in F03. The rule you quote has a very specific purpose, namely, 
safely. You don't want to allow the programmer to pass an apple to 
something that expects a cow and never get a compile or run-time error 
message. If he/she were sure it was an apple, we do allow them to do:

select type(x)
class is(apple)
   call sub(x) ! Safe
class default
   stop "i want an apple!"
end select

In the case of a TYPE(*) dummy, I see nothing that can go wrong when the 
actual is CLASS(*). TYPE(*) is like CLASS(*) [it could be of any type] 
except that a type descriptor is not passed. So one certainly could not 
pass a TYPE(*) actual to a CLASS(*) dummy, but the reverse seems 
perfectly fine and useful to me.

> And the implications of allowing polymorphism here still make me squirm 
> because of
> unintended side effects like having a TYPE(*), VOLATILE dummy and 
> coaxing the external
> mechanism into changing the type  of this object from outside :-)
I will take the smiley face to indicate a joke and not some real fear of 
the impossible.

Aleks
