As part of a larger article about C++’s evolution, DevSource reports on a minor war in the C++ standards community. Don’t get excited: the fighting is already over. At issue is whether Microsoft’s compiler can say that std::copy is “deprecated” (which usually means “this feature will not be in the next version of the language”) when they really mean “our compiler suggests you do not use it.” Is this a silly semantic dispute or another sign that Microsoft is trying to hijaack the language?
But this seems like another example of the well known Embrace, extend, extinguish policy…
And besides, they want people to use C++ .Net instead of ANSI C++, and if they had it their way, they’d have everyone writing code in C#
I like some of MS products, but things like this keep me from buying them.(or at least try to avoid them as my Defaults)
Since VS6.. Microsoft’s C++ compiler has gotten a lot better. It’s much more standards compliant… And they aren’t trying to extend they are trying to remove stuff :-D.
Take it guys, we don’t like it… Write your whole operating system in it!
That’s a joke, for the uninitiated some of us loathe c++ for valid reasons and enjoy making humorous remakrs about the language.
There was an OS written in C++ a while back … I don’t think a whole lot of people use it any more … but there are some hangers-on …
There still is an OS written in C++ right now … Almost all of the world uses it … but some people are resisting (Windows, and Linux)
C# is ok but wont run on every single os where as C && c++ will. VB.NET the next in line for script kiddies etc. Add snapin virus language.
How about microsoft just make their own ASM that will keep them happy for awhile.
herm i wonder how much copy() is in a standard linux distro.. input from people is good for standards as long as its not to futher their bottom line for shareholders..
Edited 2005-11-11 01:49
> C# is ok but wont run on every single os where as C && c++ will.
C# can run with Mono, Visual C++ can’t run on Linux (although it’s very similar to g++, there are differences and incompatibilities).
> VB.NET the next in line for script kiddies etc. Add snapin virus language.
VB.NET is just another .NET language, just like C#, Boo, or Nemerle, with another syntax. It isn’t any more script kiddy-friendly than those. (And it’s more likely that MSH would be used by script kiddies)
> How about microsoft just make their own ASM that will keep them happy for awhile.
They did. It’s called MSIL.
.NET isn’t a bad thing. Microsoft is trying to push towards it, and it’s the right choice. It provides a lot safer environment to work in than C/C++, and it provides many features and a large library to work with.
The future is managed, for many different reasons. Currently it’s just opinion whether you want to make that future in Java, .NET, Python, Parrot, or otherwise.
Microsoft assembler is called MASM.
“In the beta version of Visual C++ 8.0, one well-known C++ expert reported, the use of a common std::copy() call generates a warning that std::copy() has been deprecated.”
I am using Visual Studio 2005 FINAL and can report that it does NOT give a warning about std::copy being deprecated, so that portion of the article is pretty pointless.
Edited 2005-11-11 02:24
Actually, even the summary describes that the fighting is “already over”. The article itself makes it clear that Microsoft has agreed to change the output in the final version, albeit it only does so at the end of the article.
Ah sorry, I must have missed that part in the article.
Before this discussion degrades into a “my language is better than your language” frenzy, it appears Microsoft wants to prevent their c++ compiler from recognizing namespaces or access to static member functions within a class.
Is this an attempt to make c++ more like other languages or do Java, C-sharp, and VB also have similar namespacing capabilities?
Edited 2005-11-11 03:06
Java, C#(and the rest of the .NET languages) have namespaces…
Where did you hear this?
If std::copy is deprecated, what are they suggesting you use instead? Copying thing isn’t something you can take away from the language, obviously.
So what is the Microsoft way of copying?
It’s not deprecated, so it’s a moot point.
AFAIK, std::copy is just a memory copy routine for a list.
Well, it might not be deprecated, but they obviously wants you to use something else.
std::copy is used to copy from/to all stl containers. It’s really quite common, and doesn’t just do memory copy.
They do? It’s not a warning in final, so you don’t know that.
Of course I don’t know that, but there has to be some reason they put the message in there.
From the article:
Author Kate Gregory explained that the code construct presents a security weakness in a programmer’s code. “You can turn off that error checking,” Gregory said, “but you probably don’t want to.”
So then there should be a better way to do things, I’m just wondering what way that is. There’s not much point in warning you about something if you can’t change it to something better.
Yeah, you make a good point.
I guess we’ll never know if it was just some mistake or they an idea behind it.
So what is the Microsoft way of copying?
The world needs to switch to xcopy and UNC paths because Bill said so.
…Microsoft will be deprecated.
And what’s with this message?
warning C4996: ‘std::_Copy_backward_opt’ was declared deprecated
Is this also a MS ‘extension’?
The express version gives this message.
“In the end, though, Microsoft listened to the objections. Herb Sutter, a software architect at Microsoft and chairman of the ISO C++ standards committee, said Tuesday that Microsoft backed down. “We never intended to offend anybody. We’ve already agreed to change it,” he said.”
There, was that so hard? Herb Sutter really knows what he is talking about, especially when it comes to C++ (feel free to read his books) and this is nothing more than someone thinking that it was a good idea to smack a depricated tag on something because there is some alternative that is better. Geez, the article wasn’t about this at all, but about the C++0x standard. I for one is really looking forward to it.
Well said John, the problem with the ISO C++ standard is that it is full of security weaknesses ( this std:copy method is dangerous ) but the people surrounding the language feel so attached to every aspect of the language ( especially with regards to Visual C++ ) that nothing can be done about it … witness this furore over a trivial warning message which encourages developers to re-consider what they are doing. Hopefully C++0x will bypass this.