[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for "bind" egg: support for modern C++ nested namespace defin

From: felix . winkelmann
Subject: Re: Patch for "bind" egg: support for modern C++ nested namespace definition and scoped enums
Date: Sat, 29 Jan 2022 11:46:15 +0100

> I hope this is the right place to send this to, but here we go. For our
> project, we wanted support for some modern C++-features in the "bind" egg:
>  1. nested namespace definitions: instead of namespace A { namespace B {
>     ... } }, C++17 allows writing namespace A::B { ... }
>  2. typed and scoped enums: C++11 allows specifying the underlying type
>     of an enum: enum C: int16_t { ... }. It also added scoped enums,
>     that put all enumerators into a new scope: enum class D { E, F },
>     which then need to be referenced as D::E and D::F.
> Since bind is a thin layer over some basic C and C++ constructs and
> mostly ignores namespaces, I've extended it to accept nested namespace
> definitions and scoped and typed enums. The underlying type for the
> latter are simply ignored by bind as well.
> These changes would really help reusing declarations between C++ code
> called by CHICKEN and bindings automatically generated with the bind
> module and chicken-bind CLI tools.

Excellent! Many thanks for your contribution, I'll apply these
changes and update the documentation.

> Disclaimer: Even though I have almost 20 years of professional coding
> experience, I'm still pretty new to both Scheme and Lisp in general.
> Feedback of any kind is welcome!

The code is about as idiomatic as can get, no need to be modest
about it! :-)

Thanks again.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]