Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-02-17 04:09:12

"Gabriel Dos Reis" <gdr_at_[hidden]> wrote
> David Abrahams <dave_at_[hidden]> writes:
> | > What is bizarre and inconsistent about it and is not with the other
> | > alternatives you care to name?
> |
> | As I expected my example below to demonstrate, I think it's
> | inconsistent with the way names from non-dependent base classes are
> | dealt with when masked by function parameter names.
> But function parameters are not template parameters vice versa. And
> you should not expect them to behave the same without providing
> technical reasons why such expectations may take place.

Strikes me that one of C++ s problems is that the namespace system (which
itself partly resulted from confusion over C struct space) does not really
formally address the fact that there are many different kinds of 'space', as
examples(simplifying) object-space, type-space and template-space. (there
are of course many more and more complexities). In addition to this there
are many different programming 'contexts'.

The name resolution/ hiding problems are a result of the fact that the
spaces and contexts are informal (under the 'instinctive' banner). ie there
are no written rules to formalise it.

It might be interesting to try to understand/ hence formalise in the
language, the programmers concept of 'space' when coding.(I believe that C++
already does this ... but under the banner of 'what is instinctive') As an
example when coding in a function ( a context) using expressions, objects
should(and do) come to the fore exemplified by C++s template deduction
mechanism. However when actually writing a template definition( a different
context) the template parameters themselves should come to the fore. In a
sense this is the secret of the success of C++. ie There are many different
contexts involved in coding, which C++ informally acknowledges. C++ has
evolved to work in a particular way in a particular context. perhaps the
idea of 'context' should be the arbitrator in these kinds of matters. Accept
there are different contexts and spaces etc and formalise it. Formally work
out the contexts and spaces, and arguments of this type would more easily
resolve themselves.

Andy Little

Boost list run by bdawes at, gregod at, cpdaniel at, john at