|
Boost-Build : |
From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-03-31 00:25:46
On 2002-03-30 at 10:06 PM, david.abrahams_at_[hidden] (David Abrahams) wrote:
> Summary:
>
> Pseudo-function variables:
>
> $(foo($(bar),$(baz))) - too many parens
Has always been confusing.
> $(foo.$(bar).$(baz)) - too much like other things
Yea, too much like everything, especially module.rule invocations.
> $(foo[$(bar)]) - possible collision with $(foo[3])
> still too many parens
Absolutely not, that would be even more confusing than $(v($(x))).
> $(foo<$(bar),$(baz)>) - scary, but visually superior?
> confusable with grist
No, it's not much better, IMHO, than $(foo($(bar),$(baz)).
> $(foo:$(bar),$(baz)) - minimalist
Hmmm, kind of like it :-\ Different than anything else.
> Regular Variables:
>
> $(this-and-that) - they all look alike; locals may
> collide with intended globals
> Rule names:
>
> tea-for-two - Haven't we met somewhere before?
>
>I note that pseudo-function variables are pretty much always intended
>globals, for what that's worth. I like working mostly with lower case
>and dash separators, but maybe intended globals should use
>Initial-uppercase or something. I note that class data members are also
>intended globals, though they are used much differently.. Perhaps
>m_whatever makes sense. I'm definitely open to suggestions here.
I've never liked using "_" unless it's a macro of some sort.
I'm trying different syntax in the "doc" module I'm putting together, yes the
one I briefly mentioned in a previous conversation, and so far this is what I
like:
Pseudo-function variables (examples are my actual code):
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)
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)
Regular variables, locals only; I'd rather stick to var-dash & $(var-dash).
They are the most numerous and that's the easiest to type.
Regular variables, globals, or pseudo-globals; I really don't like using the
"_". Capitalizing things seems contrary to the Jam norm, and looks very out of
place. All CAPS I strickly think of builtins, or environment vars when I see
them. 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:
*doc,variables += $(var-name)
$(help) in [ modules.peek : *doc,variables ]
The above if they where global pseudo-function vars:
*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)
Rule names; Thinking that it would be a pain to switch to anything other than
what we already have. I'd stick with the "do-this-now" syntax. Given that:
1)the context for rules is rather different than vars, and 2) rule names are
usually verbs and vars nouns; I don't think it conflicts. Maybe we should make
a rule, :-), to make rule names always noun-like, and conversly vars
noun-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