[geos-devel] boost

Mateusz Łoskot mateusz at loskot.net
Wed Mar 1 07:20:30 EST 2006


strk at refractions.net wrote:
> On Wed, Mar 01, 2006 at 12:53:26PM +0100, Mateusz Å?oskot wrote:
>>strk at refractions.net wrote:
> 
>>>	- GEOS ABI was too weak, thus we provided 
>>>	  a C-API interface to keep binary compatibility
>>>	  in the long term
>>
>>Unfortunately, I can not get the idea of keeping
>>double APIs: C and C++ :-)))
>>
>>If something is written in C++, why to bother with C?
> 
> Becase we want some kind of insulation to keep binary compatibility
> until GEOS gets stable (could be a very long time).

Yes, that's important reason: GEOS is not stable enough to keep its API 
unchanged during development. But there are many products using GEOS 
already.

> Note that GEOS is an important module for PostGIS, and 
> it is very nice for PostGIS users to be able to upgrade
> GEOS library w/out having to recompile PostGIS, as GEOS
> life cycle is very much different from PostGIS, which is
> a much stable piece of software.

Yes, I definitely understand this situation.

> Yes, it would have been possible to make the C++ ABI stable
> as well, but not havin done from the start makes it hard now.

Sure.

> A *full-C++* approach has been taken by GDAL. In that case
> within a single library you have both C and C++ entry points,
> with C ABI compatibility retained and C++ one pretty left
> to randomness. This brought to problems in 'encoding' library
> versions, as in a versioned library you must either declare compatibility
> or not with previoius versions, and you can't make distinctions
> between the two entry points.

That's the problem.
In COM/CORBA, interface is a contract which can not be changed in 
future. Similarly, to DLL which exposes C++ interface. This interface 
should be designed once and kept in future. Certainly, it's easier to 
say than to do it ;-)))

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net



More information about the geos-devel mailing list