Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-05-10 15:17:29


[2003-05-10] David Abrahams wrote:

>Ali Azarbayejani <ali_at_[hidden]> writes:
>
>> Each class declaration requires a "rule" declaration followed by a
>> "class" declaration, making it difficult to see at a glance whether
>> a rule is a regular rule or a class definition. Short of a core jam
>> modification to allow a more obvious declaration, it may be possible
>> to reduce confusion by allowing the placing of the "class"
>> declaration just before the "rule" declaration. David plans to
>> explore this possibility. We're not sure there is an easy solution.
>
>An even easier solution:
>
> rule foo.__init__ ( args * )
> {
> base.__init__ ( ... ) ;
> rule method ( arg ) { }
> }
> class foo : base1 base2 ;
>
>We can see that foo is a class by convention: its __init__ function
>is declared.
>
>Requires no core changes at all and just a minor tweak to class.jam.

I like it. It's simple, to understand, and to modify existing code.

Question... Is there anything preventing declaring class method rules
outside of the __init__ class rule? As such...

rule foo.__init__ ( args * )
{
base.__init ( ... ) ;
}
class foo : base 1 base 2;

rule foo.method ( arg ) { }

I think that would make it easier to humanly parse the classes.

-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq

 


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