From Craig.Dedo@mixcom.com  Wed Apr  3 15:46:16 1996
Received: from mixcom.mixcom.com (mixcom.mixcom.com [198.137.186.100]) by dkuug.dk (8.6.12/8.6.12) with ESMTP id PAA29857 for <sc22wg5@dkuug.dk>; Wed, 3 Apr 1996 15:46:06 +0200
Received: from 156.46.43.40 by mixcom.mixcom.com (8.6.12/2.2)
	   id HAA26952; Wed, 3 Apr 1996 07:44:40 -0600
Message-Id: <199604031344.HAA26952@mixcom.mixcom.com>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Date: Wed, 03 Apr 96 07:43:08 -0600
From: Craig Dedo <Craig.Dedo@mixcom.com>
Subject: Default Data Type - 2 Different Definitions?
To: WG5 Mailing List <sc22wg5@dkuug.dk>
X-Mailer: SPRY Mail Version: 04.00.06.17

Dear Members of the WG5 Mailing List:

    Here is an item that I am throwing out for discussion.

    While thinking about the problem that Keith Bierman mentioned in his 
January 29 e-mail titled "Fodder for Meeting" (x3j3.1996-37), I realized that 
we may have a problem with the term "default".  In using the concept of 
"default" kind of data type, we MAY actually be using two differing and 
incompatible definitions.

    1.  The "default" kind for a data type is the kind of the data type which 
is the most frequent and suitable for the application which the programmer is 
writing.

    2.  The "default" kind for a data type is the kind of data type which is 
most natural for the hardware architecture which the Fortran compiler is 
compiling source code for.

    These two definitions need not be the same.  Many Fortran compilers offer 
a compiler option which allows the user to choose the default kind of a data 
type.  The user usually chooses a kind type which occurs most frequently in 
the application.  However, this is not necessarily the kind which is most 
natural for the hardware.

    For example, a user may encounter only a few large integers in the problem 
but many small ones.  Such a user would choose 2 byte integers as the default 
integer kind.  However, if the processor is 32 bits, it naturally processes 
data 4 bytes at a time.  The Fortran compiler for such a processor may 
implicitly or explicitly consider 4 byte integers to be the default.  Thus, 
there is an incompatibility between what the user specifies and the Fortran 
compiler assumes.

    I believe that the conflict in these two definitions is at the heart of 
the problems that we experience when we specify that certain data objects in 
Fortran should be of a default kind.  Therefore, in our work on Fortran 2000, 
we should clearly define both usages of the concept of default kind and 
rigorously distinguish which one we are using in any given situation.

    What do others think?

----------
Sincerely,
Craig T. Dedo             	Internet:    Craig.Dedo@mixcom.com
Elmbrook Computer Services	Voice Phone: (414) 783-5869
17130 W. Burleigh Place		
Brookfield, WI   53005		Disclaimer:  These opinions are mine alone.
USA				They do NOT represent any organization.

"They that can give up essential liberty to obtain a little temporary 
    safety deserve neither liberty nor safety."  -- Benjamin Franklin (1759)

