Visual C++ and C++ Standard
Screaming Lunatic writes: "There is an interview over at codeproject about the future of C++ and .NET. Since I don't really care about .NET, the interesting part of the article is about the quest to standarize Visual C++. If you're going to code for Windows, Visual C++ is one of your few choices for a IDE/compiler combo. (Even though, if I'm not mistaken, you can hook gcc up to the IDE.) M$ seems somewhat in favor of conforming to the C++ standard, which is surprising. They talk about pushing forward with template compliance. I'm still waiting for them to get the variable declarations in for-loops right. They also claim to beat several popular compilers in compliance tests."
Microsoft's goal is to have a 'competitively compliant' compiler - meaning it won't be 100% compliant. There are a couple of features of the ANSI/ISO standard (for instance the 'export' keyword as applied to template classes) that won't be implemented because they are considered by Microsoft to be obscure and, at this stage, theoretical.
.cpp files as header files), and that IMHO is just plain stupid.
Somebody please explain to me why would somebody consider export templates to be 'obscure' and 'theoretical'? If export templates aren't available, you have to put most of your code in header files (or at least use your
On the other hand, aiming for STL, Boost, Blitz and Loki compliance is a Really Good Thing.
This is the place where you write something that will make you seem like a complete idiot.
I'm still waiting for them to get the variable declarations in for-loops right.
/Za, then they already do.
If you compile with the 'disable extensions' flag,
Even with extensions enabled, VC++ 7 will warn when there's a conflict between extended and correct behaviours:
forvar.cpp(4) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
I've dug through MSDN a while back and found this to work..
//Work around for broken for-scoping in VC++ 6
#pragma warning(disable:4127)
IMHO, the C++ compiler part of Visual C++ is one of the few things that Microsoft didn't totally screw up. Unfortunately it is all the other junk, like MFC and the crummy code that the IDE's wizards produce, that ruin the development environment.
Yet Another Web Site
Microsoft is definitely full of shit when they consider 'export' to be "theoretical" only. But implementing export is hard; witness the number of compilers that have managed to do it so far. I don't blame MS for putting it off; I blame MS for lying about their reasons for doing so. (If they'd just said, "Implementing this is a freakload of work and we'd rather point our engineers in a more revenue-profitable direction," then I could accept that, too.)
The for-loop scoping bug has a command-line switch to toggle correct behavior. Unfortunately, with it on, large chunks of their own MFC code will no longer compile.
Dinkumware was contracted to provide the library for VC++. They have released their own patches (freely downloadable) to the library headers. With those patches applied, your library is as ISO-compliant as it can be given the (immense) deficiencies of the compiler itself.
For me the big killer is templates -- lots of failures in things like partial specialization.
My recommendation to others who have to work under Wintel: there are plenty of good compilers out there, and they're ALL better than VC++. Comeau, IBM, EDG, KAI, you name it...
You cannot apply a technological solution to a sociological problem. (Edwards' Law)
I pretty much agree apart from one thing:
.NET-Web-Service world
... well ... C++. Put the features into VB and all you do is make is as complex as C++ - which is not what you want for a moron's dev tool. Horses for courses.
pretty much useless in the
Not so sure myself. I was working on a plan for a SOAP type web service which does a shedload of complex calculations then throws the answer back. The only way I could see to get the performance was C++. OK, in VB/C# etc. 7 there is finally some control over things like threads, but the performance isn't there.For this sort of job, I like to be able to control exactly what the machine is doing (do you believe in the Windows task scheduler?) so I can adjust for amounts of memory, number of processors etc. Whilst this isn't impossible in other languages, it is damn hard.
Admittedly, this is an obscure example, but I'm sure there are others. If you want the performance and features of C++, then the language you want is probably
Oh yeah, and if anyone says that performance doesn't matter - just wait for the hardware to get faster, well you obviously don't work with actuaries. The complexity of calculations they want to do moves a lot faster than Moore's Law.
This sig made only from recycled ASCII
Right now I'm not using Microsoft Visual C++. I can't afford it. I do, however, want it. I really, really want it. Right now I'm using Dev C++ 4 from Bloodshed. It's open-source and free, but it can't do code completion like Microsoft can. It doesn't have those cool drop-down menus that offer you a list of all the functions in the class you just selected.
Does anyone know of any free software that does code-completion and other time-saving features? I'd really appreciate a link, or even just a name. But I have looked, and I haven't been able to find an IDE that matched the apparent ease of MSVC. For now, I look upon my friends in envy.
Too busy staying alive... ~ R.A.