From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org  Fri Dec  5 08:13:32 2014
Return-Path: <owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id C462F35733E; Fri,  5 Dec 2014 08:13:31 +0100 (CET)
Delivered-To: sc22wg5@open-std.org
Received: from nag-j.co.jp (nag-j.co.jp [111.68.142.10])
	by www.open-std.org (Postfix) with ESMTP id 6BB543571CA
	for <sc22wg5@open-std.org>; Fri,  5 Dec 2014 08:13:25 +0100 (CET)
Received: from Maru6 (218-42-159-105.cust.bit-drive.ne.jp [218.42.159.105])
	(authenticated bits=0)
	by nag-j.co.jp (8.14.5/8.14.5) with ESMTP id sB57DPph093864
	for <sc22wg5@open-std.org>; Fri, 5 Dec 2014 16:13:28 +0900 (JST)
	(envelope-from malcolm@nag-j.co.jp)
Message-ID: <D8161D80592C417592CDDA0114CF889B@Maru6>
From: "Malcolm Cohen" <malcolm@nag-j.co.jp>
To: "WG5" <sc22wg5@open-std.org>
References: <20141204170247.9A28E35837D@www.open-std.org><20141205014042.EC050358538@www.open-std.org> <20141205063232.F38DA358705@www.open-std.org>
In-Reply-To: <20141205063232.F38DA358705@www.open-std.org>
Subject: Re: [ukfortran] (SC22WG5.5375) (j3.2006) Question on PURE subroutines
Date: Fri, 5 Dec 2014 16:13:18 +0900
Organization: =?utf-8?B?5pel5pysTkFH?=
MIME-Version: 1.0
Content-Type: text/plain;
	format=flowed;
	charset="utf-8";
	reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 15.4.3555.308
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Damian Rouson writes:
<<<
On a somewhat related note, Tom Clune suggested a while back that there be a 
“virtuous” attribute that would preclude any access to non-local state.   From 
the standpoint of purely functional programming, I think this would remove a 
wart that exists with PURE procedures at least in terms of how many people would 
initially interpret the meaning of PURE.
>>>

Yes, I've seen this several times before (basically ever since PURE showed up). 
There are a lot of times that PURE as currently defined is sufficient for 
parallelism, but equally there are times when they are insufficient - even for 
pure functions.  An attribute like WHITER_THAN_THE_DRIVEN_SNOW would not only 
improve performance in such cases, they would also give the user a stronger 
guarantee that he was not inadvertantly shooting himself in the foot.

So far though I've not seen any reasonable spelling for such an attribute 
(FUNCTIONAL is the best I've noticed so far, and is pretty bad).  And so far 
I've not seen much enthusiasm for Yet Another Attribute with arguably marginal 
benefits (in my estimation, PURE gets most of the benefits both from the point 
of view of performance and safety).

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 

