|
What I'm after in PUP-7332 is consistency. The term "below" must have the same meaning in all cases. As you point out, it cannot when used together with the term "layer" and still give the same meaning as in lookup_below, so introducing that here would actually make things worse. Some other terminology must be used altogether, like "yield: below" instead of "layer: <some layer>".
What I wonder is, when is there ever a need to state 'layer: module' in the global layer? The only time I can think of, is when you actually want to accomplish a "below" in the sense that it has in lookup_below. The global layer must then have two entries, one using "layer: environment" and another using "layer: module".
I'm not so sure it's a good thing to introduce a mechanism that will allow you to bypass the environment or reverse the priority of the environment and module layer. I mean, it's OK for a layer to state, "I yield to the things below me" but it's not OK to start messing with how those things are organized internally. Not to mention the mess it will create in the current implementation.
|