Boost logo

Boost-Build :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-07-22 08:17:51


From: "Vladimir Prus" <ghost_at_[hidden]>

> David Abrahams wrote:
> > My Jam-language implementation of classes was never inteded to be used
as a
> > generalized replacement for built-in Jam lists. It was just designed to
be
> > a mechanism for improving code organization.
> >
> > I don't think there's any way you can start using "container classes"
as
> > the primary data structure in lieu of Jam lists and expect reasonable
> > performance.
>
> So, do you mean that container.vector is just useless?

No, but I wouldn't expect it to function as a general replacement for
built-in lists.

> That would be very sad
> -- in particular, I already need to compare lists of lists/or lists of
> targets and that would be *very* hard with jam lists.

You can do what I did in v1: join the inner lists into single strings with
some separator character. Hmm, newline would be an interesting choice ;-)

> Further, we have a *lot* of other places where classes are used. For
example,
> each virtual target is a class. We'd have the same performance problem
with
> them -- finding the generator would require creating a lot of virtual
> targets.

Yep, we're running up against the language limitations.
I sometimes wonder if Python packaged with something like py2exe would have
been acceptable for Boost.

Another thing you might consider for a list-of-lists structure would be
something that used two lists:

l1 = a b c 1 2 3 4 bananna orange ;
l2 = 1-3 4-7 8-9 ;

letters = l1[$(l2[1])] ;
numbers = l1[$(l2[2])] ;
fruit = l1[$(l2[3])] ;

As long as you build it in order and don't mutate it internally, it could
work.

-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