Boost logo

Boost-Build :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-03-14 08:43:48


----- Original Message -----
From: "Thomas Witt" <witt_at_[hidden]>

>
> Attached is a new version of the template feature patch for
boost-base.jam
> (current cvs).

Nifty!

> This patch should enable full template functionality as mentioned in
the
> documentation. Please note that I did only perform basic testing. Bugs
are
> quite likely. I posted it now since I won't have time to work on it
during
> the next week. Unfortunately I will have to go skiing :-).

You poor man!

Here are the problems I noticed:

* You left ECHOs you were using for debugging in the code
* When a rule has an argument list, repeating "rule name ( args + :
arg )" in the comment is redundant
* The comments don't give enough info (e.g. "returns sources with path
added" - added how?)
* Code like the following probably ought to be done by iterating over a
list of target categories:

if $(gTARGET_TYPE_ID($(grist))) in $(STATIC_TYPES)
{
libs += $(dependency) ;
}
if $(gTARGET_TYPE_ID($(grist))) in $(SHARED_TYPES)
{
dlls += $(dependency) ;
}
if $(gTARGET_TYPE_ID($(grist))) in $(TEMPLATE_TYPES)
{
templates += $(dependency) ;
}

* Rule declare-local-target was already getting too long. Now it's
/really/ too long. Please refactor

* There's no 'e' in "paths".

Otherwise, this looks really great!

> I tried to reduce code duplication this time, though there are still
some open
> issues. I suspect there might be a better solution for grist-templates
and
> add-path rules. Rene could you have a look into this ? I can't do
better now.

grist-templates looks like a cheap but effective hack. It probably does
too much work, though, and should be fixed up at some point.

> Regarding the name, you mentioned base and prototype.
>
> Rene your reason for using prototype instead of template were C++
templates. I
> think with regard to language analogy prototype might be even more
> problematic. IIRC in C/C++ we have function prototypes and there is a
> prototype pattern as well. The purpose of both function prototype and
> function pattern is different from template-targets purpose. Basically
> prototypes are not extended.
>
> What I like about base is that template-targets behave like
base-classes. What
> I do not like about base is that to me it is already to much
overloaded. With
> regard to overloading only static can be worse :-).

It's not overloaded in Boost.Build, and certainly not in the context of
target specification. Anyway, one last try at changing the name:
<basis>foobar.

> I propose we go with strict scoping for now and gather some
experience. We can
> always relax scoping if we feel its needed.

Agreed.

> As mentioned earlier I won't have e-mail access from sunday until
monday 18th.

I'm going to be away from 3/16-3/23, but will be trying to stay
connected.

-Dave

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk