From owner-sc22wg5@open-std.org  Thu Nov  6 08:43:29 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 20EAECA343A; Thu,  6 Nov 2008 08:43:29 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from ppsw-7.csi.cam.ac.uk (ppsw-7.csi.cam.ac.uk [131.111.8.137])
	by www2.open-std.org (Postfix) with ESMTP id 38C33CA3434
	for <sc22wg5@open-std.org>; Thu,  6 Nov 2008 08:43:27 +0100 (CET)
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-1.csi.cam.ac.uk ([131.111.8.51]:59881)
	by ppsw-7.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:25)
	with esmtpa (EXTERNAL:nmm1) id 1KxzWY-0002Ed-PH (Exim 4.70) for sc22wg5@open-std.org
	(return-path <nmm1@hermes.cam.ac.uk>); Thu, 06 Nov 2008 07:43:26 +0000
Received: from prayer by hermes-1.csi.cam.ac.uk (hermes.cam.ac.uk)
	with local (PRAYER:nmm1) id 1KxzWY-0003Tn-Qb (Exim 4.67) for sc22wg5@open-std.org
	(return-path <nmm1@hermes.cam.ac.uk>); Thu, 06 Nov 2008 07:43:26 +0000
Received: from [83.67.89.123] by webmail.hermes.cam.ac.uk
	with HTTP (Prayer-1.3.1); 06 Nov 2008 07:43:26 +0000
Date: 06 Nov 2008 07:43:26 +0000
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: sc22wg5 <sc22wg5@open-std.org>
Subject: Re: [ukfortran] (SC22WG5.3625) (j3.2006) A comment on John	Wallin's	comments	on	Nick MacLaren's comments
Message-ID: <Prayer.1.3.1.0811060743260.8016@hermes-1.csi.cam.ac.uk>
In-Reply-To: <20081106000048.7DA0FCA3434@www2.open-std.org>
References: <20081105225653.DCEA7CA3428@www2.open-std.org>
 <20081105232803.42621CA3434@www2.open-std.org>
 <20081106000048.7DA0FCA3434@www2.open-std.org>
X-Mailer: Prayer v1.3.1
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

On Nov 6 2008, Van Snyder wrote:
>
>> Anyway, I regard the right solution to this is that every derived type
>> should have code and decode primitives, and that you should transfer
>> the encoded form.  You need them for a great many purposes, including
>> unformatted I/O, not just MPI.
>
>Clause 9 of the Fortran standard already does this.  It makes my head
>hurt to write the encode and decode primitives for every derived type,
>and then rewrite them whenever a tiny detail changes.  I suppose I could
>use internal I/O, which on some systems many years ago was provided by
>ENCODE and DECODE statements.  I'd rather use coarrays, and if they're
>not available I'd rather use unformatted I/O.

Internal files have been provided since Fortran 77!  Yes, I remember ENCODE
and DECODE, in many different variants, but let's move on.  Also, let's
skip the unnecessary restrictions on internal file use, which are a pain.

You are using coarrays to solve a problem that has nothing to do with
parallelism per se.  While that is a perfectly reasonable decision from a
programmer's viewpoint, it is a damn bad basis for designing a standard!
Also, my point is that general derived types will contain pointers - and
you have no option but to encode and decode THOSE!  I should prefer for
a language and program design paradigm to get the general case right,
rather than to have a collection of special-case hacks.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1@cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679


