|
Boost-Build : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-05-24 06:49:33
Vladimir Prus <ghost_at_[hidden]> writes:
> Hi,
> I rewrote path.glob again, hopefully it's the last time.
>
> The problem with the previous implementation is that it would iterate
> over all elements in a dir even if 'pattern' had no metacharacters. First,
> that was slow -- if you handed
>
> /cygdrive/w/My Documents/boost/test/a.cpp
>
> to it, it would crawl all the way to the top, listing each directory and
> checking each file. Second, it would fail, because Cygwin is broken and
> does not show 'cygdrive' is the list of directory elements of '/'.
>
> The new glob is implemented as new 'GLOB-RECURSIVELY' builtin. I've decided
> to use builtin since otherwise, we'd need 'does this name exist' builtin,
> and if we need new builtin, why don't implement all globbing in core.
Because:
a) it means you can't just get the 'does this name exist'
functionality without paying for globbing
b) if you made a mistake in your globbing code you will have to
ask people to rebuild again.
I'm not saying you should reverse what you've done, but there were
good reasons I established the principle that the core should stay as
small as possible.
-- Dave Abrahams Boost Consulting 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