Because I'm fascinated by what I find to be a rather odd psychological
aversion that many people have towards the "std::" prefix, usually for
no logical nor rational reason.
(And no, I'm not asking for your rationale or reasons. I have heard it
all a million times. Nothing is even close to convincing, sorry. I'm
just explaining what I find interesting about this.)
I'm also curious about how "using namespace std;" became so ubiquitous.
Why did its use spread like a wildfire, and persists to this day?
Where do people learn it? Why do people use it? Is it cargo cult
programming? Do people just see it being used in tutorials and examples,
and start repeating it with no second thought about it? Why does there
seem to be such a strong instinct to write that line in order to get
rid of the "std::" prefix? You see it all the time, and it just puzzles
me where this tidbit of habit comes from and how people learn it.
Perhaps the psychology behind it is closely related to the psychology
behind so many programmers using variable and function names that are
needlessly short to the point of being detrimental to the readability
and understandability of the code.
(I think one quintessential example of this is POSIX: If you look at
all the names, function names, macro names, variable names... defined
by POSIX, you'll notice a clear pattern of brevity over clarity in many
cases. Sure, POSIX itself is not really to blame here, because it simply
officially standardized what was an bunch of unofficial "standards",
and it just took most of the existing stuff as-is, without wanting to
change it, for backwards compatibility. However, regardless of who is
responsible for those names, it just quite clearly shows the
brevity-over-clarity psychology behind it.)