|
Boost-Build : |
From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-03-31 12:15:17
On 2002-03-31 at 09:16 AM, david.abrahams_at_[hidden] (David Abrahams) wrote:
>
>----- Original Message -----
>From: "Rene Rivera" <grafik666_at_[hidden]>
>To: <jamboost_at_[hidden]>
>> > $(foo<$(bar),$(baz)>) - scary, but visually superior?
>> > confusable with grist
>>
>> No, it's not much better, IMHO, than $(foo($(bar),$(baz)).
>
>What I like about it is that the <>s stand out from the parens for me,
>making it easier to parse (note that you dropped one above -- an easy
>mistake to make).
>
>> > $(foo:$(bar),$(baz)) - minimalist
>>
>> Hmmm, kind of like it :-\ Different than anything else.
>
>But the pseudo-function-ness is a little harder (for me) to see in this
>case.
After writing a bit more code with the ":" it's not as clear as I thought. And
it has one drawback, which we didn't notice before, it doesn't work :-) It
collides with $(var:D), etc. I started using ";" as a subsitute. I'm leaning
more towards the "<>" use, it does stand out:
long ?= $(short) ;
rule,brief,doc<$(module-name),$(name)> = $(brief) ;
rule,short,doc<$(module-name),$(name)> = $(short) ;
rule,long,doc<$(module-name),$(name)> = $(long) ;
...
for local line in $(rule,long,doc<$(module-name),$(name)>)
{
ECHO " "$(line) ;
}
>To really get a sense of these, you have to look at them the way they
>are /evaluated/ also:
>
> $(doc,rule,brief:$(rule-name))
> $(doc,variable,default-value:$(var-name))
> $(doc,variable,brief:$(var-name))
> $(doc,variable,short:$(var-name))
> $(doc,variable,long:$(var-name))
>
>Does the pseudo-function-ness of it seem to be hidden among all those
>parens?
Yes.
>No need for "doc," is there, since everything is strictly local to the
>doc module?
By now they are, they didn't start out that way :-)
>(BTW, I'm still worried about having to invoke 3 separate rules to write
>the docs for a rule or variable. Lots of times I'm lucky if I can think
>of one way to say it, much less 3. Won't we end up with a patchwork of
>brief, short, long comments?
>Also, I hope there will be few or possibly no variables introduced by
>the system, so we won't need user-level variable docs
>)
Right now long-s are optional, but I could take the Javadoc approach of using
the first sentence as the brief?
>> I'm also thinking the above might be rearranged like so:
>>
>> rule,brief,doc:$(rule-name)
>> variable,default-value,doc:$(var-name)
>> variable,brief,doc:$(var-name)
>> variable,short,doc:$(var-name)
>> variable,long,doc:$(var-name)
>
>or
> $(rule-name).brief
> $(rule-name).short
>i.e.
> $($(rule-name).brief)
> $($(rule-name).short)
>
>Better, to my eyes, though the multi-argument case (rare) is a little
>less great. Still, it works IMO:
>
> $(x),$(y).function
> $($(x),$(y).function)
>
>
>Yeah, we're back to that. Used in that order, the dot makes more sense
>to me. I'm not terribly convinced of anything yet...
>
>Note that this arrangement is used in modules.jam:
>
> return $($(module).__binding__) ;
Hmm, I'll have to try some of these out.
>> "_". Capitalizing things seems contrary to the Jam norm,
>
>??? Perforce caps all their rule names.
Yes, but we haven't.
>> I kind of liked the gCAPS, except for the caps. But without the caps
>> it's gcaps :-(. So an initial character to identify globals would be
>ideal.
>> And the only one I can think that sorta fits is "*". For example:
>
>Hmm, I'm probably headed off in a dangerous direction here, but what
>about:
>
> .my-global = list of things ;
> do-something $(.my-global) ;
>
>That has a nice consistency with the idea of "." as scoping operator (we
>use a :: prefix to reach global scope in C++).
>> a rule, :-), to make rule names always noun-like, and conversly vars
>> noun-like.
>
>I guess you meant to make rules always verb-like. I don't always like
>that: see sequence.length for example. I'd rather have no rule for the
>time being, I guess.
Oops, yea, verb-like :-)
-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]
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