On 2014-12-18 11:58-0500 Hazen Babcock wrote:

>
>> From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
>> Subject: [Plplot-devel] The current project to upgrade the Fortran
>>      interface
>> To: Arjen Markus <arjen.mar...@deltares.nl>,         PLplot development list
>> c_<function_name>c_<function_name>   <Plplot-devel@lists.sourceforge.net>
>> Message-ID: <alpine.deb.2.02.1412171005160.23...@enira.zlyna.ubzr>
>> Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
>>
>> An additional possible goal we have been discussing is whether or not
>> to replace the traditional #define <function_name> c_<function_name> +
>> bindings/f95/plstubs.h method with the fortran-iso-c-binding BIND
>> method of dealing with Fortran name mangling.  The large advantage of
>> this change is it would allow us to get rid of those confusing
>> #defines in our primary header file and also get rid of many more name
>> complications/obfuscations in bindings/f95/plstubs.h.  The
>> disadvantage is BIND was only introduced as part of the Fortran 2003
>> standard so the question Arjen is contemplating right now is how wide
>> is the support for BIND amongst Fortran compilers.  Between us we have
>> tested MSVC and a large number of different flavours of gfortran (for
>> Linux, Cygwin, and MinGW/MSYS), and so far so good.
>
> Changing the names in this way would break the cl-plplot Lisp bindings.
> I think it would probably also break at least the following other
> bindings: ada, ocaml, octave and tcl (based on a quick grep for the "c_"
> prefix) as well as the Perl binding. So that might be a large disadvantage..

Hi Hazen:

I should have emphasized that the "c_<function_name>" name cleanup is
something that is made possible by the Fortran bindings rewrite
(assuming that rewrite used the BIND method), but is not required by
that rewrite.

Of course, assuming we use the BIND method for the fortran bindings
rewrite, and decide to do this cleanup after that rewrite, the cleanup
would be done with complete internal consistency (i.e., by checking
all files in our source tree for the "c_" string, and making the
appropriate change).  So that should automatically take care of all
internal issues such as potential breakage of Ada, OCaml, Octave, and
Tcl.

I do agree with your point that this cleanup would be a
backwards-incompatible change for external software such as the
cl-plplot Lisp binding which apparently depends on the
"c_<function_name>" name form.  We don't make such
backwards-incompatible changes gratuitously because we want to
minimize disruption as much as possible for external software that
depends on PLplot.  But the case for the "c_<function_name>" name
cleanup is pretty compelling since it dramatically reduces name
obfuscation. Therefore, I think the right thing to do is to go ahead
and make that cleanup and also have a prominent warning in the release
notes about the backward incompatible change so that no external
software developers are caught by surprise.  Note we also try to make
external software developer's lives easier by providing
PLPLOT_VERSION_MAJOR, PLPLOT_VERSION_MINOR, and PLPLOT_VERSION_PATCH
macros so that external software adjustments for PLplot
backwards-incompatible changes can be implemented with conditional
compilation that depends on exact PLplot version.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to