Boost logo

Boost-Build :

From: David Abrahams (gclbb-jamboost_at_[hidden])
Date: 2003-06-17 10:22:48

Vladimir Prus <ghost_at_[hidden]> writes:

> [moving this to mailing list]
> David Abrahams wrote
>> >> (1) Dave and I talked about possible syntax for user interface. If a
>> >> feature is not "free", you can just write something like this
>> >>
>> >> ( a.cpp <toolset>gcc:a_gcc.cpp <toolset>msvc:a_msvc.cpp ) b.cpp ...
>> >>
>> >> and it will get translated. (Typically conditions are made up of
>> >> non-free features.)
>> >
>> > What's the semantic of the above?
>> It means, take the property <source>a.cpp unless there's a
>> more-specific condition in this parenthesized group, in which case,
>> use the property it indicates.
> This appears to be precisely the semantic of alternative, right? You have
> several items and only one of which is selected.


>> > So, property-set.create would do something smarter than just sorting all
>> > properties. But it would have to sort some properties --- else much more
>> > property-set instance will be created.
>> I don't see why. It's easy to detect that two Jam lists have equal
>> contents without ever sorting anything. Reasonably quickly, too.
> Suppose you end up with two property sets. One contains
> <define>FOO <define>BAR
> and the other contains
> <define>BAR <define>FOO
> Semantically, they are the same. If you've processed the first set, you can
> cache the results and do nothing about the second. If you compare them as
> strings: well, they are different.

Yes. To check for set equality you do:

if $(a) in $(b) && $(b) in $(a) ...

> I fact, property-set modules desperately lacks comments. The story
> is simple: I wrote it, added nice comments and accidentaly removed
> it. The rewritten version soon appeared, but I had no time for
> commenting for the second time :-(

Seems like it's still up to you, then :-?

Dave Abrahams
Boost Consulting

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