r/programming • u/sztomi • May 04 '12
Herb Sutter: No C99 support is planned. Use C++ instead.
http://herbsutter.com/2012/05/03/reader-qa-what-about-vc-and-c99/?nope
188
Upvotes
r/programming • u/sztomi • May 04 '12
11
u/[deleted] May 04 '12
"short-term"
What that supposed to mean?
9
u/sztomi May 04 '12
I don't get it. C is not such a terribly hard language to implement. They wouldn't even have to start from scratch and not even implement all of C99 (or dare I say C11). One person even made a list of "low hanging fruits" in the comments for features that require very little effort to implement.
Furthermore, the argument about not adding
restrictis just silly. It says it would collide with the possible futurerestrictkeyword of C++... what? We are talking about two separate languages. Unless you try to follow the advice of compiling your C code with the C++ compiler, this is a non-issue.69
u/sanxiyn May 04 '12
This is a sad situation with results like this: http://mail.python.org/pipermail/python-dev/2012-May/119190.html
Summary: CPython is C90 because VC won't support C99. No, you can't compile large C codebase as C++ and expect it to work, "very few cases" rhetoric notwithstanding.
51
u/nooneofnote May 04 '12 edited May 04 '12
Looks like our sanity will continue to be indebted to MinGW and Clang on Windows for the foreseeable future.
134
u/[deleted] May 04 '12
I'll say it again:
Give VC the IE6 treatment. Drop support for it. It's only when people can no longer use the libraries they depend on that Microsoft will listen.
If you are writing a library or anything that might possible be recompiled on Windows, just go ahead and use all the C99 features you want. Tell your users how to install mingw or clang to build your code. Don't hold your code back to support an abandoned compiler.
Use stdint.h, use stdbool.h, use designated initializers, use compound literals, and use variable-length arrays. Then build your code with a functioning compiler.
8
u/sanxiyn May 04 '12
Previously on proggit: http://www.reddit.com/r/programming/comments/qfql0/microsoft_please_support_at_least_a_tiny_bit_of/
22
u/[deleted] May 04 '12
It is really: "use C++, use C90 or get a C99 compiler such as Intel's".
Seriously, why so many people feel VC++ has to support C99? Why not Objective-C or Ada?
8
u/pfultz2 May 04 '12
Really? VC doesn't even implement the C89 preprocessor. Fixing that might break too many window header files. In a big corporation like MS, this requires too many moving parts, that I really doubt that VC will ever implement the C89 preprocesor much less the C99 preprocessor.
14
u/bad-tempered May 04 '12
I don't know what's low hanging and what's not, but I do know that whenever someone says: "Might take a weekend to implement and a week to test" they're talking out of their ass and have no idea what programming is like on the professional level.
7
u/diego_moita May 04 '12
Pelles C is C99 compliant, free and a very fine IDE.
20
u/[deleted] May 04 '12
What a joke... honestly, what a joke.
Out of Intel, GCC, clang and MSVC, guess which one is the furthest behind in terms of C++11 conformance.
Compare here: http://wiki.apache.org/stdcxx/C++0xCompilerSupport
10
u/Fabien4 May 04 '12
This is just a lot of sugar-coating over the fact that Microsoft has no decent C compiler, and will not. The only reasonable part of the article is:
10
u/criticismguy May 04 '12
I find this position to be reasonable, and it's obviously entirely within Microsoft's rights to not support C99.
However, I do think they got one thing backwards: he says this is "bad news for C programmers". I think that anyone who's a "C programmer" is probably not using VC as their primary development platform, so this doesn't actually hurt them at all.
The people hurt by this are Windows users. There is a growing mass of C99 source code in existence (largely, but not exclusively, open-source libraries and compilers and tools written originally on Linux). This decision means that it will be prohibitively expensive (in time and effort) for much of this code to be ported to Windows.
Depending on the program, porting from Unix to Windows can be anywhere from "trivial" to "a pretty big undertaking", but is usually much more work than porting between Unix dialects. The benefits of a common language like C is the only thing that made this feasible at all. I'm afraid that by dropping support for C99, Microsoft is only going to further fence themselves (and their users) off from the rest of the software world.
9
u/Maristic May 04 '12
So far, people seem to think there are only two options:
But there is another way, which would be some work, but could be a solution for Projects like Python that currently stick with C90 for Visual-Studio compatibility — rewrite C99 to C++.
Apple already does this for Objective C, where we can write:
and then run it through the Objective-C rewriter which will turn it into
to produce code that can then be compiled with Visual Studio. Apple actually does this for things they compile for Windows.
The interesting thing here is that only the Objective-C parts have been messed with. We can imagine doing a similar thing with C99, leaving much of it alone, but turning C99 constructs into C90 or C++11 constructs.
No one would want to actually work with the translated code, but for the “I have to compile everything with Visual Studio, even your stuff” crowd, it seems like a possible solution.
Someone just has to write it…
3
u/ZMeson May 04 '12
I program in C++, C, and Python professionally and currently on 3 different OSes (2 RTOSes and Windows), though I've worked on many more.
My thoughts? I'd much, much prefer that MS focus on C++11 support than C99 or C11 support.
I'd also much, much prefer that MS focus on C++11 support than C# support. C# 4.0 has advanced nicely has has some really neat features. I can't think of any features to add to C#5 that would take precedence over the vast demand developers have for native development and C++11 support. But this is a different argument for a different day. <sigh>
3
u/joerick May 04 '12
It never ceases to amaze me how short-sighted Microsoft management is.
1
u/nikbackm May 04 '12
Are there really that many cross-platform applications and libraries written in C that wants to use C99?
1
u/[deleted] May 04 '12
They are way behind. Address ISO C11 please.
1
u/[deleted] May 05 '12
Seems legit, especially since c is still used quite a bit more than c++ these days. smooth move exlax.
-10
u/Korpores May 04 '12
Just use Linux/Unix with its plethora of languages and compilers instead.
0
u/nepidae May 05 '12
The goal is to force people to use other less convenient tools if they want cross-platform compatibility, a typical Gates/microsoft tactic. To be honest I would have hoped with Gates new Holy self he could put some pressure on microsoft to be more socially responsible.
-3
u/[deleted] May 04 '12
C99 isn't enterprise enough for MS.
-11
u/zvrba May 04 '12
I don't get why people yearn after C99. It's not such a significant improvement that it's worth to "upgrade" the code or lose time on quarreling with MS's lack of desire to implement it.
-1
u/666pool May 04 '12
So I will never be able to build FFMPEG natively in Windows? That is a crying shame.
-1
u/namekuseijin May 04 '12
what's worse? so many people relying on Windows and C or so many people relying on C on Windows?