On 2015-05-22 13:00+0100 Phil Rosenberg wrote:

> Hi All
> I mentioned this briefly during the previous release cycle, but we all
> had more pressing things to deal with. Dealing with errors is
> something we really  need to get a hold on for PLPlot 6 and one of the
> big drivers for considering a major API change. However, I am certain
> that the reason why this has been a problem s that propagating those
> errors back up through many layers of function calls is tedious and
> error prone so it has been much simpler to simply call exit().
>
> Here is one possible solution. We switch the core code to C++ with a C 
> frontend.
>
> I am aware some people on this list know C++ better than others,
> however, the actual code changes I am suggesting are relatively small.
> It may seem daunting, but I am not considering rewriting everything in
> an object oriented way, I am simply advocating using two features of
> C++ which will make our lives massively easier. I feel the change
> would be less painful that the switch from svn to git, but with much
> larger gains so please hear me out. So the following is aimed at those
> of us who are a bit wary of C++ that have better C skills. If I'm
> teaching my granny to suck eggs then I apologise.

Hi Phil:

I am one of those active devopers without C++ skills at the present
time, but I could slowly acquire those as needed just as I have done
since 2000 with C, DocBook, Python, CMake, and Fortran 95 for my
PLplot development needs. (Before I started working on PLplot in 2000
the only computer language I needed or used was Fortran 77.) That
said, however, there are plenty of PLplot topics on my plate (e.g.,
build system, testing, documentation) so if I ended up leaving the
development of the C++ core library to others, that might be a good
division of the on-going development labour.

Anyhow, I have no objections to moving to a C++ core library from
personal concerns about me not knowing the language.  And you did go
on to describe the C++ advantages of proper handling of arrays and
propagation of error conditions which sounds like a substantial
benefit.

However, let's be clear here the cost of that benefit is
likely to be considerably higher than you are estimating now.
For example, there is going to be substantial costs in terms of
doxygen and DocBook documentation, and also the domestic bindings and
foreign bindings (e.g., the PDL and Lisp bindings for PLplot) are of
some concern.  Of course, in theory you could write a perfect C wrapper
library for the C++ core so bindings on that C wrapper work just as
well as they do for PLplot 5.  But that C wrapper would really
have to be perfect and would make the bindings less efficient.  Note,
I don't want to emphasize that last point too much since reliability
is much more important to me than speed.  But at some point, I assume
you will want to address that issue (e.g., for the swig-generated
bindings) by ignoring the C wrapper and binding directly to the C++
core instead which adds to the cost of this change.

Anyhow, I just wanted to sound a note of caution here about the amount
of labour involved, but with a perfect C wrapper I see no fundamental
concerns with such a change.  So if you can get the other active core
developers on-side with changing our core library to C++, then I
certainly will not stand in the way and, in fact, if the consensus is
yes, then I expect to immediately be taking an active part in this
change via required changes that will be needed to the build system
and the documentation.

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
__________________________

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to