Hi all,

a week ago Denis Simonov submitted a PR[1] regarding formatting of the
new time zone types of Firebird 4.0 (which appears sensible per se).
This requires to access new Firebird APIs which are written in C++ (the
old Interbase APIs are still provided as C code).  Now the Firebird
developers have written a tool for cross language support called
CLOOP[2] which allows to access the APIs written in C++ directly from C.
 However, they do not provide these C APIs officially, so Denis provided
the minimal required C API for inclusion into the PDO_Firebird extension[3].

In my opinion, this a somewhat fragile approach (especially since
CLOOP's C generator apparently hasn't been tested for a rather long
time[4]) and would personally rather use C++ to access the new APIs.
This would obviously require a C++ compiler to build PDO_Firebird (so
far a C compiler is sufficient), unless the C++ code (and the respective
functionality) would be optional.

Another drawback would affect the Windows builds; so far these just
could use the Firebird kits provided by the Firebird developers (which
contain headers and pre-built libraries), but these don't contain any
C++ libraries, so the libraries would need to be built and hosted by
winlibs[5] (at least for the time being).

I *assume*, however, that (Linux) distros already provide pre-built C++
libraries since the new Firebird OO API is available as of Firebird 3.0.
 Maybe someone can confirm that.

So what do you think?  Should we use C++ to access the new APIs, or
stick with C (and include the required declarations in PDO_Firebird)?

[1] <https://github.com/php/php-src/pull/15230>
[2]
<https://www.firebirdnews.org/new-firebird-interface-cloop-cross-language-object-oriented-programming/>
[3]
<https://github.com/php/php-src/pull/15230/files#diff-e0657e20b6fc2c130f504c18ebeeac828847f17f1f8f7c3559b8fe8b2bc19928>
[4] <https://github.com/FirebirdSQL/firebird/issues/8197>
[5] <https://github.com/winlibs>

Cheers,
Christoph

Reply via email to