Is there any interest in C++ Tcl bindings?
I wanted to find out how far I can push boost.describe so I create C++ tcl
binding based on it, PoC is here
https://github.com/klemens-morgenstern/boost.tcl
It's currently a rough PoC so it'd be a lot of work to make this a proper
boost library, hence the question if there's some actual interest,
otherwise it's a nice toy project.
All you need to do is to use boost.describe for your enum or class and then
you can use them in tcl:
// C++
enum test_enum {foo = 1};
BOOST_DESCRIBE_ENUM(test_enum, foo);
struct my_class
{
double foo;
void bar(int);
};
BOOST_DESCRIBE_STRUCT(my_class, (), (foo, bar));
BOOST_TCL_PACKAGE(Test_module, "1.0", mod)
{
auto & cmd = boost::tcl::create_command(mod, "test");
auto & enm = cmd.add_subcommand("enum");
enm.add_enum
On Fri, 30 Sept 2022 at 05:25, Klemens Morgenstern via Boost
Is there any interest in C++ Tcl bindings?
It could be an excellent testing ground and show case how to develop such bindings in modern C++. Lua could be next. Even if it fails to gain any major interest, I'd allot the idea (and the library) a wild card. Long time ago, a friend of mine created these two https://cpptcl.sourceforge.net https://cpptk.sourceforge.net which I used to use/help out with too. I remember those once gained quite a lot of interest. The monthly downloads counter is still beating... Python still maintains the interface to Tcl/Tk... Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
On Fri, Sep 30, 2022, at 5:25 AM, Klemens Morgenstern via Boost wrote:
Is there any interest in C++ Tcl bindings?
First of all, that looks like an awesome demonstration of Boost Describe.
I wanted to find out how far I can push boost.describe so I create C++ tcl binding based on it, PoC is here https://github.com/klemens-morgenstern/boost.tcl
Wouldn't this be excellent as a non-boost library? Tcl seems a bit far from the mainstream. Boost Python makes sense to me. A thing like Boost Lua or Boost JNI might make sense. Tcl seems to be so much more niche (perhaps it is used in specific industry?) Perhaps a more modern C++ binding should be bundled with it, instead. Phrased as questions - what makes this is a good addition for Boost? - what are pros/cons of making it a Boost Library for adoption by Tcl users? - are parts applicable to Boost Python? Seth
On Fri, Sep 30, 2022 at 4:21 PM Seth via Boost
On Fri, Sep 30, 2022, at 5:25 AM, Klemens Morgenstern via Boost wrote:
Is there any interest in C++ Tcl bindings?
First of all, that looks like an awesome demonstration of Boost Describe.
I wanted to find out how far I can push boost.describe so I create C++
tcl
binding based on it, PoC is here https://github.com/klemens-morgenstern/boost.tcl
Wouldn't this be excellent as a non-boost library? Tcl seems a bit far from the mainstream. Boost Python makes sense to me. A thing like Boost Lua or Boost JNI might make sense. Tcl seems to be so much more niche (perhaps it is used in specific industry?) Perhaps a more modern C++ binding should be bundled with it, instead.
Phrased as questions
- what makes this is a good addition for Boost? - what are pros/cons of making it a Boost Library for adoption by Tcl users? - are parts applicable to Boost Python?
Boost is modular, and this library in particular (if accepted) would probably always remain a "leaf" dependency, no other Boost library will depend on it. So I don't see a problem with it getting a Boost review, assuming there is enough interest in the community to write reviews. If not, so be it.
Definitely interested. TCL specifically as it would be nice to modernize and extend some legacy usage where there is significant investment on both sides of the interface. Here comes the scope creep (which would surely come up in review). A common binding library (or a common binding interface and some easy extensibility) for various languages has some appeal. At a glance the code structure looks nice and if nothing else looks amenable to cut and paste adaptation to other languages. On Fri, 30 Sept 2022, 1:26 pm Klemens Morgenstern via Boost, < boost@lists.boost.org> wrote:
Is there any interest in C++ Tcl bindings?
I wanted to find out how far I can push boost.describe so I create C++ tcl binding based on it, PoC is here https://github.com/klemens-morgenstern/boost.tcl
participants (5)
-
Darryl Green
-
Emil Dotchevski
-
Klemens Morgenstern
-
Mateusz Loskot
-
Seth