Re: Standard Versus Non-Standard C++
On Tuesday, July 3, 2012 12:29:17 PM UTC-5, Roman W wrote:
On Tuesday, July 3, 2012 2:04:32 AM UTC+1, Le Chaud Lapin wrote:
Thus is the essence of my argument. A C++ standard's body, of all
organizations, plainly stated that C++/CLI is not C++, yet Microsoft
persists in saying that it is.
I don't think Microsoft means it's C++ in the "ISO C++ standard" sense, just that
it's for practical purposes, C++. The string "C++" may mean different things in
different contexts. Such is human speech.
I find it hard to believe that I am the only who sees that Microsoft has
been engaged in a sustained, concerted, deliberate effort to divert as,
many coders as possible from standard C++ to a .NET form of C++. The
supporting evidence in this thread alone should be at least an indicator.
1. Microsoft hoped to get their C++/CLI standardize by ISO. When they
learned that that route would be problematic, they went through ECMA,
likely because ECMA would present lower standards (pun intended) for
acceptance. That strategy worked..
2. In the ECMA specification, it is written:
"This specification is a superset of Standard C++." Page 10 of:
http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-372.pdf
But ISO UK found that C++/CLI is a new language. These two standards
bodies cannot both be right. Either it is a new language or it is not.
Also, there is an interesting direct question posed on Code Project:
"Is ISO C++ code directly compilable in C++/CLI?"
One programmer responds:
"NO IT WILL NOT"
http://stackoverflow.com/questions/4206574/is-iso-c-code-directly-compilable-in-c-cli
"According to the MSDN documentation it will. But it's a nasty lie.
I have fallen into this trap. When already thousands LOC's were
written, it turned out that CLI has problems with boost::thread.
The latter just doesn't work. So I assume that there may be other
things too. So just don't go there, that's my good advice."
3. Microsoft had a column called "Pure C++". The strategy here is based
on psychological pre-emption. It works like this: You're trying out
various motorcycles to buy, and the one you like has very low power.
The salesmen know this is a problem, so they put out ads saying,
"Feel The Power!!!" One says the exact opposite of what the customer
is thinking. In this case, the C++ is ~not~ pure, so you preempt the
customer by calling it pure up-front.
http://msdn.microsoft.com/en-us/magazine/cc163852.aspx
4. Microsoft got Visual Studio Express into universities everywhere.
Then they abruptly decided that it would only allow .NET
development. Coders rebelled, and they relented...but the key
point is that they tried.
5. An article was written on Code Project by someone with the
alias Qwertie called:
"Head-to-head benchmark: C++ vs .NET"
http://www.codeproject.com/Articles/212856/Head-to-head-benchmark-Csharp-vs-NET
The article is professional grade.
It should take perhaps 30-60 seconds to figure out which prominent
C++ expert, working for Microsoft, is behind this article.
6. Microsoft, having been successful at fast-tracking C++/CLI through ECMA,
figured that the pipe would be greased for ISO standardization.
As pointed out, ISO UK/France/Germany/etc. proved them wrong.
7. Microsoft, in its MSDN documentation, has had a long history of making
a distinction between Standard C++ constructs, and those that are
"Microsoft-specific", which is precisely the label that they use for
those things that are Microsoft-specific. But for CLI, they deliberately
omitted the "Microsoft-specific" annotation until some in the community
complained. They started revising their documentation to point out
that CLI was Microsoft-specific.
8. Yet still, Microsoft is crafty with their wording. In their
documentation for Visual Studio 2008, they state:
"Keywords are predefined reserved identifiers that have special
meanings. They cannot be used as identifiers in your program.
The following keywords are reserved for Microsoft C++. "
And now the most important statement:
"Names with leading underscores are Microsoft extensions." <<
http://msdn.microsoft.com/en-us/library/2e6a4at9(v=vs.90).aspx
This leads the reader to infer that names ~without~ leading
underscores are not extensions, and therefore standard.
But names without leading underscores on that page include:
* array
* const_cast
* delegate
* deprecated
* enum struct
* event
* finally
* friend_as
* gc_new
* generic
* initonly
* interface class
* interface struct
* literal
* naked
* property
* ref struct
* ref class
* safecast
* sealed
* using
* value struct
* value class
To drive home the point of how to distinguish between Microsoft-specific
keywords and those that are standard, Microsoft writes, again:
"In Microsoft C++, identifiers with two leading underscores are
reserved for compiler implementations. Therefore, the Microsoft
convention is to precede Microsoft-specific keywords with double
underscores. These words cannot be used as identifier names."
...thereby implying, once again, that keywords lacking leading
underscores are not Microsoft-specific.
I could go on with hundreds of examples like this from across the
Internet of text and videos where Microsoft essentially claim that
C++/CLI is the future of C++, as well as show the confusion that
resulted when programmers asking if their ISO C++ will work under
C++/CLI context or not, etc..
-Le Chaud Lapin
{ redundant link and quoting removed -mod }
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]