Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-06-11 09:44:09


David Abrahams wrote:

> > BTW, what's the motivation for
> >
> > import uitls/path ;
> >
> > style, as opposed to
> >
> > import path ;
> >
> > Better indication of what layer we're using?
>
> The motivation is basically the same as for Python packages. Systems
> grow. We're going to allow users to write modules with arbitrary
> names, and eventually we'll almost certainly want to use the same
> module name in two different layers.

I see. OTOH, long module names are not required in Python. Usually, you write

import popen ;

and only for special package something like

import xml.dom ;

> > I'm thinking that if string layering is to be enforced, we can allow
>
> string layering?

"strict layering" --- i.e. when modules from one layer can only import modules
from the layer below.

> >> > But anyway: we've got to allow plain imports without directory in
> >> > 'project-root.jam' so adding binding of including module to search
> >> > paths will still be needed.
> >>
> >> Sure.
> >
> > And the same for toolsets:
> >
> > using gcc ;
> >
> > must remain the same.
>
> But that, fortunately, is not "import gcc". We're allowed to be smart
> and invoke "import tools/xxx" from the implementation of "using xxx."

We'd need to check if module of this name exists in the current directory,
too. Ok, that's possible as well.

- Volodya

 


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