|
Boost-Build : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-07-09 10:37:59
As I'm going through and editing the BBv2 tutorial I am continually
finding myself troubled by our target reference format:
some/project/path//target
I ask myself, whenever I see this, what information we are getting
from the double slash? In all the examples I can find, the double
slash is the final slash (read on, I know it's not). So I think to
myself:
Why are we making this special visual distinction here?. All we
really want to know is that it's a target reference and not a path
in the filesystem. We want to know that when we *start* reading it
(at the left), and not only after we've begun to look into its
details. That's why I prefer the '@' prefix used by BBv1.
OK, so I read on a bit and find that we're using constructs like:
/other_project//lib1/<link>static
Now, this just seems like egregious overloading of the "/"
character. Here we have a target reference and a property.
Presumably the reason we need "//" is because an implicit feature
might be used:
/other_project//lib1/gcc
and we need to distinguish this from the target called "gcc" in the
other_project/lib1 project. But how is this _not_ going to be
confusing for people? It's confusing for me!
It seems to me that we really ought to be using some other character
to separate properties from target names. For example, I see no
reason we need to allow colons in target names. Why not:
@other_project/lib1:<link>static
Or, if there's some problem with colons, I could think of quite a few
other eligible characters (for example, |), that would visually
distinguish the target name from any properties we want to attach.
Even "@" would work OK:
@other_project/lib1@<link>static
Though I guess I prefer the colon.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
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