[GRASS5] Want GNU libavl ?

David D Gray ddgray at armadce.demon.co.uk
Thu Jan 24 11:08:57 EST 2002


Bjorn Roald wrote:

> Wednesday, January 23, 2002 12:23 AM,  David D Gray wrote:
> 
> 
>>I think ever more complex data structures get developed faster if you
>>use OOP techniques, but I'm not really advocating C++. I much prefer
>>java, Ada - a host of others - before C++. I do concede however that C++
>>is mainstream and many good implementations are available that are
>>difficult to find elsewhere, even in C, and we should adjust our policy
>>now to be more accomodating to these.
>>
> 
> David,
> I fully understand your wish for a more expressional language. Also, a lot
> of functional and well designed code are available in many such languages.
> 
> I am not sure however, that I actually understand what you are proposing.
> If I understand you correctly, you would like to use C++ in libraries that
> later are linked into pure C executables.  I think this is possible through
> C interface functions, but I see it as less desirable, not very clean road .
> I will expect that the convenience of using a C++ compiler for compiling all
> the sources will soon be causing all the C/C++ sources to be built with the
> C++ compiler.  If that happens, then it is goodbye to plain old C in the
> GRASS sources.  


I don't think so. There is general resistance to using C++, and I 
believe that is generally a good thing. But many implementations of 
algorithms are written in C++, and these tend to be the ones the authors 
maintain as `production' quality. C implementations often are absent or 
poor in features, or are created just as an experiment that is poorly 
maintained

> Neither will we se an abrupt change into good C++.  In
> general, I think C++ is a better fit in the higher level apps/libs than on
> the lover level stuff of a mixed environment.  These possible effects need
> to be considered carefully.
> 
> 
> 
> To all,
> 
> I am just now reading this thread, a lot of good reasoning both for and
> against loosening the policy.  I have considerable C++ experience, in small
> and large projects.  I have also used and maintained a few C libraries as
> part of larger projects developed in C++.  My experience is consistent with
> a lot of the balanced postings of C++ vs. C  you can read on the net, but
> frankly - most more or less religious C (or C++) advocates are noisy people
> with little other than noise to bring into the debate.  I think that this
> get worse by 2 facts (among others):
> 
> 1.
> A lot of C programmers don't understand C++ at all.  (still some of these
> are noisy)
> 
> 2.
> A lot of C++ programmers don't know their C++ well.  The language is to
> complex to adapt to quickly without a framework limiting the scope of
> knowledge needed for the more common programming tasks.  This is a big
> problem causing a lot of bad C++ code, which then back burns on the language
> itself.  This is not really fair.
> 
> Let us avoid falling into these holes when we debate.  We need to keep in
> mind that the worst thing that could come out of this is alienating some of
> the contributing developers.  Apart from that, I think it may be just as bad
> to avoid making modern tools available to the developers due to policy
> alone.  Those policies need to be based on reasoning of what is best.
> 


Agreed.


> For my part, I rather maintain good C than bad C++.  


Agreed again.

> But for my overall
> decision of whether to start working on the GRASS source code, an adoption
> of C++ would most definitely count.  Maybe there are other potential
> developers thinking the same -- I don't know.
> 


Well if you have an OOP outlook, and have from the start of your coding 
career, you perhaps can only really develop forward thinking in those 
terms. It's just that at the time C++ was the only tool most people had 
to develop with, and it was just accepted as many people just accept 
Microsoft and Windows because they don't know of anything else. When 
things started to open up in the mid-90's, and especially when Java came 
along, you could choose and critically evaluate OOP options. With OOP 
scripting languages like Python, PHP and Ruby now, that creates another 
avenue of choice, because these are really wrapper interfaces to an 
onject-oiented C environment. But still C++ has the widest circulation 
and is used more than any other OOP language, even among developers of 
free and open-source software.

We could talk about this for ever, but it can only be put to the test 
when a developer comes up with a specific proposal with genuine merit 
for  including or writing a component in C++ (or other language).


David








More information about the grass-dev mailing list