C
coal
Does anyone ponder what life would be like if we
stopped using namespaces? Instead of
namespaces, a website could be used to propose/
register names. Namespaces were designed when
the internet was young and few understood how
things were changing. Today it is clear a website
could provide uniqueness and authoritative
information about names such as an overview and
where to find more information. The language would
be simplified by shedding the well-meaning but
convoluted rules pertaining to namespaces.
On comp.std.c++ a few weeks ago I replied to a loosely
related post by James Kanze and have copied some of
that here.
I'm not crazy about how the language permits context
sensitive type name semantics. Some keywords are also
type names and those you can't "overload." Which way
is the standard heading? Will it someday be possible
to get rid of the big in bigint or should it go back to its
C roots in this respect?
I remember Stroustrup saying he didn't want UDTs to be
second class citizens. It seems in some ways the standard
went too far in that UDTs can be overloaded but the standard/
built-in types can't be. A new Boost library called Intrusive
originally had a type called ilist. In the review a number of
people said they preferred to change it to just list and use
namespaces to differentiate things. I said what if this library
becomes part of the standard? The reply was that std is
getting cluttered and should be segregated with namespaces.
If there are just two "list"s in std it isn't too bad, but the
slippery slope part comes in in that once you have more than
one there's no clear boundary. There could be proposals to
add more "list"s in the future and IMO that gets too confusing. You
have to be familiar with all of them to be sure you are
reading the code correctly.
Brian Wood
Ebenezer Enterprises
www.webebenezer.net
In God we trust -- United States national motto.
stopped using namespaces? Instead of
namespaces, a website could be used to propose/
register names. Namespaces were designed when
the internet was young and few understood how
things were changing. Today it is clear a website
could provide uniqueness and authoritative
information about names such as an overview and
where to find more information. The language would
be simplified by shedding the well-meaning but
convoluted rules pertaining to namespaces.
On comp.std.c++ a few weeks ago I replied to a loosely
related post by James Kanze and have copied some of
that here.
Context dependent keywords is a slippery slope, that I
don't think anyone really wants to go down. They make
understanding the language considerably more difficult.
I'm not crazy about how the language permits context
sensitive type name semantics. Some keywords are also
type names and those you can't "overload." Which way
is the standard heading? Will it someday be possible
to get rid of the big in bigint or should it go back to its
C roots in this respect?
I remember Stroustrup saying he didn't want UDTs to be
second class citizens. It seems in some ways the standard
went too far in that UDTs can be overloaded but the standard/
built-in types can't be. A new Boost library called Intrusive
originally had a type called ilist. In the review a number of
people said they preferred to change it to just list and use
namespaces to differentiate things. I said what if this library
becomes part of the standard? The reply was that std is
getting cluttered and should be segregated with namespaces.
If there are just two "list"s in std it isn't too bad, but the
slippery slope part comes in in that once you have more than
one there's no clear boundary. There could be proposals to
add more "list"s in the future and IMO that gets too confusing. You
have to be familiar with all of them to be sure you are
reading the code correctly.
Brian Wood
Ebenezer Enterprises
www.webebenezer.net
In God we trust -- United States national motto.