Name: Anonymous 2014-01-18 22:19
What's wrong with C++ and where does the name sepples comes from anyway? I mean apart from the sometimes fucked up syntax rules.
using
statement, but the language could easily be designed to have that apply to classes instead. So instead of saying using namespace std;
or std::cout
, you'd say something like import std;
or std.cout
. It seems it would clean up the syntax quite a bit. If there's some optimization-related reason that namespaces are more efficient since the compiler knows they can't be instantiated as an object, couldn't the same be achieved by declaring a class as static class std {};
? That would tell the compiler that the class contains only static members and will never be instantiated (and will result in a compile-time error if we violate that constraint). It just seems to me that namespaces just end up complicating the syntax when another already-existent language feature could do the same thing just as well.