> On 23 Sep 2021, at 6:46 am, Wietse Venema <wie...@porcupine.org> wrote:
> 
> C and C++ are similar enough that C can easily be wrapped in C++.
> I'd love to adopt Gtest which I have been using internally at Google
> over the past 5+ years.

Sure, but these days you can write C in any language. :-)

By which I mean that many languages support a C FFI, at least
in Haskell's case it is actually rather easy and idiomatic to
embed C APIs, and then get excellent test coverage of the
enclosing code from "QuickCheck", though not the internal
execution of underlying C API.

Since one might then be tempted to actually take advantage of
robust in-process concurrency, the C code thus integrated would
need to lose mutable globals (one time initialisation of shared
static settings would be fine).

Anyway, just off topic musings...  FWIW, ~15 years I embedded
the Postfix SMTP client I/O layer in Perl, and had a nice high
level API just issue a command with an expected reply first digit,
and either succeed or raise an exception.  Timeouts, ... all
handled by the Postfix C code (tweakable from Perl as the SMTP
state evolved).  Layered multi-language development can be a win.
Helps discipline around separation of duties.

-- 
        Viktor.

Reply via email to