Namespaces are syntactic sugar, instead of doing: namespace penis { unsigned char a=0; }
you could just write: unsigned char penis_a=0;
Distinction between public and private is stupid for the same reason described above. Also, instead of using for and while you could just use if and goto. And I have several more examples...
Why do people keep designing bloated programming languages like C++?
Name:
Anonymous2014-05-30 13:33
Use Oberon.
Name:
Anonymous2014-05-30 14:06
Seriously, use Oberon. The whole language spec is 1.5 pages. The compiler is 2 MB. It doesn't even construct an abstract syntax tree. If that isn't minimalistic, then only assembly is.
>>7 I said that, and quoted myself, but due to deforestation optimization the intermediate data structure was fused so now you see only quotes.
Name:
Anonymous2014-05-30 14:44
>>1 namespaces are worse because they can not used in C but one cool thing is that I can do namespace nigger = factory.factory.lgbtqjidf.hax.my.ani.penis.african.american; nigger.penisPunishment ();
Name:
Anonymous2014-05-30 14:44
Open a bug report in your post compiler then, it doesn't preserve the semantics.
>>1 Namespaces would only be syntactic sugar if &(ns::var) == &ns_var evaluates to true. Otherwise, they're two different ways of doing the same thing, but they're syntactic sugar ONLY IF the compiler/intepreter views them as having the same meaning. For example, the [] operator is syntactical sugar for pointer arithmetic, because they can be used interchangeably.
Distinction between public and private is stupid for the same reason described above.
private (i.e file local/static variables and functions) are useful because they can easily be eliminated as dead code by linkers if they happened to not be used (like including a header file with a bunch of common static helper functions).