5 ms·
I'm seeing a lot of negativity here that I don't understand. The post seemed fairly well-reasoned and reasonable; the objections seem to assume that the conten
by blahedo 14y ago
I'm seeing a lot of negativity here that I don't understand. The post seemed fairly well-reasoned and reasonable; the objections seem to assume that the content of the objection should be obvious. It's not obvious to me---C++ is not a superset of C, and hasn't been for some time now, although there remains a lot of overlap and cross-pollination. So why shouldn't a C++ compiler decide to just be a C++ compiler?
- mikeash 14y agoI don't think there's anything wrong with having a dedicated C++ compiler. But it seems fairly crazy to me for Microsoft not to have a C compiler that's even remotely up to date. C is still an important language, and "just compile it as C++" is not a good answer.
- bunderbunder 14y agoC is a very important language, but not so much among Visual Studio's target market. Windows developers tend to be rather C++-centric, and I'm guessing the biggest reason why the compiler team hasn't bothered is because there just isn't sufficient demand to justify the diversion of resources. I'm also guessing a lot of the world's C99 code has dependencies beyond the just the compiler that Visual Studio won't support without some effort. "Just compile it as C++" is not a good answer, but I wouldn't be surprised if "just install Cygwin" often is.
- waterlesscloud 14y agoThere's still a ton of C legacy code running on windows machines out there.
- mccoyst 14y agoYou say that like they are removing all C support. Unless that "legacy" code suddenly mutates to use C99 features that aren't in C++, it'll still compile in the future.
- waterlesscloud 14y agoBut will never be updated to include C99 features. Exactly.
- mccoyst 14y agoExactly what? C99 doesn't have any killer features that legacy code would need to "update" to. If a C89 program is working, adding unique-to-C99 features isn't going to magically make it better.
- adgar 14y ago> Unless that "legacy" code suddenly mutates to use C99 features that aren't in C++, it'll still compile in the future. Forcing legacy code to stay woefully out of date to support a single vendor's stubbornness, perpetually growing its maintenance burden as the rest of the world moves on. Hooray for the Microsoft way!
- mccoyst 14y agoI have severals problems with this. 1) The implication that working legacy code needs to be modified to use C99 features lest it be "out of date". 2) The idea that the world is moving on to newer C standards. 3) The idea that legacy code is moving on at all. C90 isn't going away, and it's not Microsoft's fault. Many C compilers still support 1st edition K&R style for a reason — old C code is going to stick around, and it's probably not going to change much, let alone in any way that needs C99 features.
- wolfgke 14y agoAd 1) If C99 (or C11) was supported, you could perhaps use C99/11's features to refactor parts of the legacy code into more elegant code than possible with C89 (and yes, there are sometimes good reasons not to use C++). Ad 2) If there is support for features there will be people using them.
- bradleyjg 14y agoRight but not a lot of C99 code, hence the indefinite C90 support.
- mikeash 14y agoIt seems like kind of a self-fulfilling prophecy at this point. VS's dialect of C is literally more than two decades out of date at this point. Let your C compiler stagnate that long, and C developers will migrate to alternatives, leaving you with a C++-centric audience of your own making. I don't know if that's what happened, but evidently C was important enough at one point for them to support it.
- ArbitraryLimits 14y agoThey can get away with it because C has an ABI, so cygwin + gcc -mno-cygwin can build binaries that interoperate with Visual Studio's libc. Lots of open source projects build their Windows distributions this way - GTK for example has been doing it for about 10 years now.
- yuhong 14y agoIn particular, C++98 and C99 was when C and C++ began to split, and obviously MS chose to implement C++98 instead of C99.
- someone-else 14y agoNo. It started to split with C++98, when C++ started to error on things that were valid C.
- someone-else 14y agoThe thing is that they haven't decided that. They decided that they're going to be a C and C++ compiler, but only for an outdated version of C.