Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C is officially deprecated.

Personally I would like to see proper C++11 support instead of playing around with C++/CX and while they are at it, either provide a native compiler for .NET or improve NGEN's optimizer for C++ performance level.

Given that Microsoft had .NET native compilers for Singularity and Windows Phone 8 .NET apps are compiled to native code, it isn't as if they don't have the tooling already available.



What do you mean by C being officially deprecated? As a whole this can't be possible as codes like the Linux kernel are written in C.


I mean that Microsoft already at the Visual Studio 2012 launch mentioned that the C tooling won't be updated except for critical bugs.

The main native language in Microsoft tooling is C++.

http://herbsutter.com/2012/05/03/reader-qa-what-about-vc-and...


I think he meant in the context of Visual Studio 2013. Imagine doing a build of the Linux kernel with Visual Studio 2013?!?


Many cross-platform libraries are written in C. Microsoft's terrible support for C causes those projects a significant amount of pain. If the upstream library developers don't have time/interest to restrict their dialect to avoid various C features and to test regularly with Microsoft compilers, they either (a) drop support for Windows, or (b) only support Windows via non-Microsoft compilers. Neither of these options are very appealing for users of those libraries on Windows.


Well, you might want to do that if you were building a colinux-style paravirtualized system on top of the Windows kernel.


honest question, is the Windows kernel written in C++? If not, what does that team use to build it if "C is deprecated"?


The Windows kernel is C++. From what I've seen (shared source), it's mainly C-style C++ though. I didn't see a single template or a class in my travels.


If you read the WRK, ntoskrnl is all C...


Or a C++ subset in the near future, if the BUILD 2012 remark is true.


and most of all extern "C", possibly no exceptions, no RTTI, no global new/delete, etc. - e.g. "embedded"-C++ like (only guessing).


Most likely yes.


it's in C. as it was explained to me once, the compiler team asked the kernel team if they would be fine fixing C support at C89 and the kernel team said "sure". being the largest and most important consumer of the compiler (at the time, possibly still today) that was that.

the kernel team is also pretty slow to adapt new C compilers and you can see this by watching the lag in compiler versions released in the driver development kit vs those released with visual studio.


At Build 2012 it was mentioned that the C code that still exists was being made C++ compatible.

Similar to what GCC did before changing to C++ as implementation language.


What? Since when was the last time C++ ever produced external symbols readable by anyone else?

If mangling/decoration of symbols was standardized, and how to structure vtables, and how to handle exceptions, and etc. etc. etc. - then I can say "C is officially deprecated". Until then - C is still the lingua franca for native development.

Write in C++ all you want, but expose "C" interface - you would be accessible much easier from anywhere else.


> What? Since when was the last time C++ ever produced external symbols readable by anyone else?

It is called COM and since Vista most new Win32 APIS are actually COM based.

WinRT is also COM based.

> Until then - C is still the lingua franca for native development.

Not on Microsoft world. If they continue on the same route, your favorite language needs to speak COM.


On that matter:

https://twitter.com/fearthecowboy/status/288721251374071808

Notice I also ranted about VS2012, Win8 SDK, Metro Firefox, and XP.


Sometimes it's harded than that. For example in Windows XP, if you have __declspec(thread) variable then it won't work if it's in DLL (this has been fixed since Vista).

Not really a compiler, but more like linker/loader problem. If the __declspec(thread) is in the main .exe it works.

Things like this affect for example ANGLE (WebGL) when compiling for XP, as such one would have to resort to TlsAlloc/TlsFree.

It's just an example, where an OSS might've used the gcc/clang primitive for thread-safe var, and later someone does it for Visual Studio, only to understand later that it won't work when in DLL for XP.

Now I know XP is no longer supported, but a lot of OSS projects still target it. (and probably lots of others).

Then again, it's not such biggie, for example Elmindreda, the GLFW developer was really kind to re-implement the feature once I reported the problem.


Wouldn't you have a similar problem when porting to another systems where the OS vendor compiler is used?

I had my share of issues using xlc, aCC and sunpro cc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: