Boost logo

Boost-Build :

Subject: Re: [Boost-build] RFC: Boost.Build Python Prototype
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2016-11-14 16:02:01

On 14.11.2016 15:44, Ryan Gonzalez wrote:
> So, some comments:
> - HOLY CRAP that logo is awesome! :D

> - This kind of irks me:
> default = 'hello'
> Seems odd for there to be ONE module-level, magic variable. Maybe
> something like `set_default('hello')` would be better?

Sure it's possible, but I found a simple variable, well, simpler. I'd
rather use a more "plain" syntax (such as variable assignment) rather
than function call. But this being Python, there are many ways to
achieve this. If you think the main namespace shouldn't be polluted with
such special variables, perhaps we could use another one such as
__builtin__ or similar.
Anyhow, I'd prefer to focus on the design, syntax, data flow, and
capabilities for now, as naming discussions tend to get stuck easily,
which would be a waste of everyone's energy and time.

> - What's the significance of the action's name? Pretty much every
> time, you're just using the return value. Is it just for error messages?

It's an action's name that is reported by bjam during a build. Only when
run with '-d2' or higher is the actual command being displayed. (Note
that the action's name is in many cases qualified, for example by the
tool name it belongs to, and the module it is defined in.

> - Actually, in general, I think the whole string vs return value think
> could be kind of confusing. For instance, default is a string for the
> target name, and you use it to reference the object files in the first
> examples, but then you use the return value in the Composite Targets
> example. What exactly is the difference?

There is none, it's a matter of convenience. Using strings has to be
possible (for the normal case where the corresponding target object
doesn't exist yet), but once your build logic gets complicated enough
it's far more convenient to use Python's own variable and object handling.
So I thought that it would be simplest to stipulate that strings and
target objects could be used interchangeably in most (if not all)


      ...ich hab' noch einen Koffer in Berlin...

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at