Boost logo

Boost :

From: Maciej Sobczak (prog_at_[hidden])
Date: 2005-10-01 11:47:49

Pavel Vozenilek wrote:

> You may perhaps take some inspiration in these Boost-like language bindings
> I know about:
> - C++ interface for TCL

> These would likely deserve place in Boost but AFAIK they weren't suggested
> for review yet.

Which is inaccurate.

C++/Tcl was announced at Boost almost one year ago. After that I was
suggested to bring it to langbinding, which is an effort to provide a
universal back end to any language. At that time, the following two
things were (and still are) clear to me:

1. Different scripting languages and the abilities of their interpreters
can be sooo different that finding a universal ground for all of them
would take years of design only. In fact, I don't believe that any such
universal base will be ever created, if not by finding a common
denominator which unfortunately might not be satisfying to anybody.

Example 1: Tcl has a type "system" that is fundamentally different from
that of Python. In particular, in Tcl the type of a variable does not
depend on how the variable is set, but rather on how it is queried. For
example, the value "Boost" can be seen as a 5-char string, but "0" can
be used as *every* type in Tcl, be it bool, integer, string or even list
(whose only element can be again treated as any type, depending on how
we want to look at it) - this is very different from how the types are
treated in Python and largely influences what can be done on the binding
level. On the other hand, Tcl has no built-in (ie. on the interpreter
level) support for classes and inheritance, whereas Python has it.

Example 2: Tcl has an object-based approach to interpreters and there
can be *many* of them, even completely independent (this includes the
possibility to run them in separate threads). Any given interpreter can
be made "safe" by disabling certain commands, so that it is very easy to
create "jails" or "sandboxes" - very useful for applications that need
to execute untrusted scripts. In addition, it is possible to alias
commands from one such interpreter to another, which makes it even more

In other words, a "universal" binding would need to be full of
fundamental compromises.

2. I don't see any *benefit* from building such a "universal" thing. I
think that users of different scripting languages form rather disjoint
audiences and any overlap here is too small to justify the effort to
create a universal language binding.

These two were the reasons for C++/Tcl to go ahead alone. In retrospect,
I think it was a good decision, especially if we take into account that
C++/Tcl is now a mature project with growing and interesting user base
and that at the same time langbinding did not do any progress.

Having said that, I take the opportunity to remind C++/Tcl here (well,
*you* did it first :) ). It was inspired by Boost, uses Boost and has
the old Boost licensing scheme. If during the last year the objectives
of Boost wrt scripting languages changed from what it was a year ago,
then I will be pleased to see it considered as a candidate for Boost.

Here's the link again:

Maciej Sobczak :
Programming    :

Boost list run by bdawes at, gregod at, cpdaniel at, john at