|
Boost-Build : |
From: Pedro Ferreira (pedro.ferreira_at_[hidden])
Date: 2005-01-28 07:10:52
Em 28 Jan 2005, às 11:46, Vladimir Prus escreveu:
>
> On Thursday 27 January 2005 20:39, Pedro Ferreira wrote:
>
>>> Well, consider that what we're discussing are really global
>>> *constants*. It's data that is initialized once and then never
>>> touched again. Global constants don't present the same kinds of
>>> problems as global variables do.
>>
>> Ok, I'm convinced.
>> Proposal: make everything global, except targets and all artifacts
>> generated for a build.
>> I'll try and make some modules' state "resettable" so we can test them
>> easily.
>> Anyone sees a problem? Volodya, you seemed to be in line with my
>> proposal
>
> I was and still is. If you tell me what's "resettable" then I'll be
> happy to
> go with globals for now.
Changed feature, property, property_set, scanner, toolset and type so
that they now have global state.
Added a function called 'reset' to each one of these, which resets the
global state.
All unit tests call them beforehand and work correctly.
Is this ok? If it turns out to be a bad choice, I'll ask Dave to revert
it ;-)
>>>>> BTW, I know this is probably a religious issue, but space
>>>>> separating
>>>>> function names from argument lists makes them hard to read because
>>>>> you
>>>>> can't visually "grep for [a-z](" to find all calls.
>>>>
>>>> It is religious but I don't have a problem with that. I'll try.
>>>> BTW,
>>>> what's the general feeling about that?
>>>
>>> I know that some significant fraction of people do it your way. But
>>> what can I say? They're just wrong ;-)
>>>
>> :-)
>
> At least in Python there's no question where to put curly braces.
You bet.
Regards,
Pedro
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