From Keith.Bierman@eng.sun.com Thu Mar  2 02:34:56 1995
Received: from Sun.COM (koriel.Sun.COM) by dkuug.dk with SMTP id AA13127
  (5.65c8/IDA-1.4.4j for <SC22WG5@dkuug.dk>); Thu, 2 Mar 1995 23:16:04 +0100
Received: from Eng.Sun.COM (engmail2.Eng.Sun.COM) by Sun.COM (sun-barr.Sun.COM)
	id AA26095; Thu, 2 Mar 95 14:14:55 PST
Received: from chiba.Eng.Sun.COM by Eng.Sun.COM (5.x/SMI-5.3)
	id AA25223; Thu, 2 Mar 1995 10:35:46 -0800
Received: from localhost by chiba.Eng.Sun.COM (4.1/SMI-4.1)
	id AA06968; Thu, 2 Mar 95 10:34:57 PST
Message-Id: <9503021834.AA06968@chiba.Eng.Sun.COM>
To: Miles Ellis <mellis@vax.ox.ac.uk>
Cc: SC22WG5@dkuug.dk
Subject: personal submission for the april meeting
Date: Thu, 02 Mar 95 10:34:56 PST
From: Keith.Bierman@eng.sun.com
X-Charset: ASCII
X-Char-Esc: 29


I do not recall a virtual meeting of the subgroup on inter-operability
having occurred. So the following remarks should be taken as my
personal position only.

Currently virtually every operating environment of any commercial
consequence has services which are defined (or are readily definable)
in terms of a C binding. While Objective-C and C++ may take over in
the future, they are extensions to C, not replacements. 

Therefore ensuring that a Fortran program can call an arbitrary C
"routine" would do much to facilitate the usage of Fortran.

Calling arbitrary C routines requires some extensions to Fortran. We need

	1) conformant datatypes
	    bitfields

	    unsigned

	    c strings

	    specified mappings (perhaps a standard module which
            provides the platform specific binding, but with
	    standardized spellings, such as kinds C_FLOAT, C_DOUBLE, etc.)


	2) calling conventions

	   specifically STDARG mapping

	   name mapping (the Fortran name may not be the C name, e.g.
           _foo->foo) 

           character*(*) etc.


If we had these features in the Standard, other groups (end users,
vendors, industry consortia) could easily provide bindings to *all*
system services (posix, posix threads, windowing systems, network
services, etc). It is impossible for us (Fortran standards workers) to
replicate the work of the larger wider community. Nor is it desirable
to seek out lowest common denominators (e.g. one could create a
"portable Fortran" subset of popular windowing systems such as
WSWIN32, X11R5, X11R6, and Display Postscript. But the result would
make users unhappy on *any* of those platforms. But with appropriate
additions to our Standard, it would be possible for each of those
technology suppliers (MS, X-consortium, Adobe) to provide a Fortran
binding. If they chose not to, users could do the work themselves).


I propose that WG5 establish a subgroup whose charter is narrow and
timely. The group should prepare a report which details a complete
facility for binding to the ISO C language. After we have such a
report, we could ballot it as a technical report *and* incorporate it
into the F2K base document. Thus it would have sufficient standing to
be worthwhile for implementors to implement and users to eventually
rely upon.

There will, no doubt, be those who would prefer that we align
ourselves with more grand projects such as ORB or CLID/CLIP or any of
a dozen other efforts. I do not believe that such work will prove
timely, or in some cases be efficient enough, or in many cases ever
actually be widely implemented. 

One can argue that this does not support certain other ISO efforts;
but it is vital to our user community. I feel the latter is the
community we ought to serve in this matter.

