[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Last patch reviewed.
From: |
Paul Smith |
Subject: |
Re: Last patch reviewed. |
Date: |
Sat, 15 Sep 2007 18:14:02 -0400 |
On Thu, 2007-09-13 at 15:12 +0000, Boris Kolpackov wrote:
> Why not change the "get" syntax to be $(somefile: VARIABLE) instead
> of $(somefile::VARIABLE)? This way:
>
> 1. The "set" syntax is already there.
Not sure what you mean by this?
> 2. From the backwards-compatibility standpoint, 'somefile: VARIABLE'
> is a very unlikely existing valiable name, more so than
> 'somefile::VARIABLE'.
Actually, somefile::VARIABLE is not an extremely unlikely variable name.
Because ":" is a special character to make it's very difficult to create
a variable name with this syntax. The only way to do it is set a
variable to ":" then use that to construct the variable name. Also, are
you suggesting the whitespace be mandatory? I don't know that I like
that since it sort of violates expectations; in other places in make
whitespace is optional except where it is required as a word separator.
For instance a target relationship "foo:bar" is perfectly legal, as is
"foo : bar" or "foo: bar" or even "foo :bar". If the whitespace is NOT
mandatory then having two colons is probably less likely than one.
Also, remember that substitution references have a similar syntax:
$(var:a=b). This wouldn't conflict with your suggested syntax because
subst. references require the "=". However, it's still close enough to
perhaps be confusing.
Finally, I chose "::" because various OO languages (C++, Perl, etc.) use
this as a naming scope modifier already.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.us
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist