Visual Cpp Versus Gcc

Visual C++ is not compliant to the C++ spec, so it really is a different language in many respects than something like GCC who is trying for C++ spec compliance. Would that Microsoft formalize their bastard and get a standard written to it, the world would be a better place. (GNU could write a free version of it! :)

Visual C++ has virtual template functions, useful rules about resolving symbols in ambiguous scopes, impressive linker magic not possible in non-Microsoft universes: all kinds of goodness. VC++ really IS a better programming language than GCC. Time and time again VC++ has compiled less bug-prone code for me than GCC even if it has Microsoft stank all over it and its own language quirks are not adequately specified. In my opinion, VC++ applies, in general, a more orthogonal set of rules to all types of code in a program than a spec-compliant compiler like GCC would. VC++ is a more expressive language than C++.

Variadic macros are a very nice addition to GCC and add a lot to the expressiveness of the language. I rely on these heavily now. VC++ should be jealous.

Visual C++ has untenable standard library licensing terms which preclude linkage to many essential libraries that have open source licensing terms. This one fact has led me to blow untold zillions of hours converting to a GCC shop. It has been a painful transition, I would not do it again if I had a choice.

-- AnonymousDonor


For people not in the know, GCC stands for GnuCompilerCollection. See GnuCpp for the C++ implementation.


Visual C++ is not compliant to the C++ spec - MSVC has a number of (optional) extensions that are non-standard; however the latest version of the compiler, when set for "ANSI mode" (really oughta be called "ISO mode"), conforms to the standard just about as much as any of the other well-known C++ compilers (except Comeau's, which IIRC is 100% conforming).


Exactly what are the "untenable standard library licensing terms which preclude linkage to many essential libraries that have open source licensing terms"?

The EULA wordage has changed significantly since the open source linkage fracas started. Platform SDK and MSVC EULA's used to call out GPL and Linux specifically by name (seemed catty and childish at the time) implicating that their viral licensing could/would transfer to Microsoft works. The language of the EULA's has become much more general and lawyer-friendly.

I think this was a FUD attack, but it did raise the real spectre of license incompatibility for static linking microsoft redistributables with open source code. Indeed, when linking to Microsoft's C runtime libraries, could one argue that even the current EULA language that the EULA terms are incompatible with the GPL, at least (maybe even BSD-style licenses too)?

Some people care about licensing terms because they can be used by Microsoft as a hammer to smash enemies. Others don't care and live a carefree life shipping MSVC-dependent open source code on sites like SourceForge. I see releasing code compatible with MSVC as encouraging bad corporate behavior, so I don't do it anymore.


From the VC.Net 2003 EULA:

You also agree not to permit further distribution of the Redistributables by your end users except you may permit further redistribution of the Redistributables by your distributors to your end-user customers if your distributors only distribute the Redistributables in conjunction with, and as part of, the Licensee Software and you and your distributors comply with all other terms of this EULA.

3.2If you use the Redistributables, then in addition to your compliance with the applicable distribution requirements described for the Redistributables, the following also applies. Your license rights to the Redistributables are conditioned upon your not (a) creating derivative works of the Redistributables in any manner that would cause the Redistributables in whole or in part to become subject to any of the terms of an Excluded License; and (b) distributing the Redistributables (or derivative works thereof) in any manner that would cause the Redistributables to become subject to any of the terms of an Excluded License. An "Excluded License" is any license which requires as a condition of use, modification and/or distribution of software subject to the Excluded License, that such software or other software combined and/or distributed with such software (x) be disclosed or distributed in source code form; (y) be licensed for the purpose of making derivative works; or (z) be redistributable at no charge.

A relevant discussion regarding this EULA can be found here: http://developers.slashdot.org/comments.pl?sid=104491&cid=8897712

This discussion ranges from "MS EULA and GPL can be compatible if MS is given a special exemption to the GPL" to "there is no conflict because of some legal statement X elsewhere in the EULA." The damage is done though because the FUD worked on me: Microsoft communicated their distaste for open source and waved the legal sword around.

-- AnonymousDonor


Why hold Microsoft responsible for the license incompatibility? Why not complain about "untenable open-source licensing terms which preclude linkage to standard runtime libraries"? All Microsoft's EULA really says is that you are not allowed to re-license their libraries under open-source terms, which seems reasonable. There is no problem with BSD-, MIT-, or even LGPL-style open-source licenses; it is only something like the GPL that creates a problem.

Note that the GPL allows "as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable." As the run-time library DLLs are distributed with Windows and service packs, there would be no need to include them in a binary distribution other than as a guarantee of version compatibility.

But is the generally accepted standard plaform compiler and libraries in a different class than 3rd party open source libraries? On Windows, the standard compiler is Microsoft's, (with ICC as a drop-in replacement for performance critical stuff.) Perhaps the untenableness comes from the fact that a compiler is the gateway to getting one's program onto a platform. Changing the compiler's licensing terms to be suddenly incompatible with hobgoblin license X, while understandable from a Microsoft competitive/survival standpoint, does tend to set a precedent in that the platform is now unavailable to some class of code. Where does this lead? Only Microsoft signed native code is licensed to be allowed to run on Windows? Surely with the virus problem Microsoft has been having, this would be an 'understandable' move. But it's also a freedom-limiting move to users, that's probably where the untenable-ness comes from.


CategoryCpp


EditText of this page (last edited January 15, 2006) or FindPage with title or text search