Most active commenters
  • pjmlp(3)

←back to thread

218 points signa11 | 12 comments | | HN request time: 1.275s | source | bottom
1. akdev1l ◴[] No.43680726[source]
> Microsoft has unfortunately chosen to neglect C for a long time, its compilers dragging far behind the rest of the pack.

Is this still true? MSVC is pretty good at compiling C++ nowadays

replies(6): >>43680811 #>>43680812 #>>43680819 #>>43681047 #>>43681159 #>>43681236 #
2. chaosite ◴[] No.43680811[source]
MSVC always focused on C++, and C was treated as an afterthought.
replies(1): >>43703860 #
3. qsort ◴[] No.43680812[source]
I think he's referring to C specifically, not C++. It's true that modern versions of MSVC are compliant (and they're also typically faster at implementing features than gcc and clang), but for the longest time there were subtle differences in their C library. To this day I don't think they support VLAs, which are technically standard C (At least until recently, I'm not sure about the latest versions, hopefully someone more knowledgeable can say more).
replies(1): >>43686097 #
4. DobarDabar ◴[] No.43680819[source]
Compare performance, features or anything of Clang and MSVC and you'll see the differences.
5. shakna ◴[] No.43681047[source]
For C (not C++), MSVC got C17 in 2020, apart from VLAs - which are never planned. No real roadmap for if/when it will get C23 - which is not just fully implemented in GCC, but the default used standard.
6. pjmlp ◴[] No.43681159[source]
They are talking about C not C++, for Microsoft C was done, it was about time to move into C++.

This was the official position in 2012,

https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an...

However after the Microsoft reboot with Satya, there was a change of heart regarding C, back in 2020, with C11 and C17 being supported,

https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-...

And 2022

https://devblogs.microsoft.com/cppblog/c11-atomics-in-visual...

However there is no official roadmap regarding C23 support, and now with the whole safety discussion going on and Secure Future Initiative, probably will never happen.

Additionally clang is a blessed compiler at Microsoft, it is included on Visual Studio, so whatever MSVC doesn't support can be done in clang as alternative.

replies(1): >>43681339 #
7. camel-cdr ◴[] No.43681236[source]
Microsoft took 30 years to implement a C89 compatible preprocessor: https://docs.microsoft.com/en-us/cpp/preprocessor/preprocess...
8. HexDecOctBin ◴[] No.43681339[source]
They have added one feature (typeof) from C23, so maybe they will add the rest when they release C++26. Or maybe they won't. Microsoft is an expert in inflicting the cruelty of providing just enough hope.
replies(1): >>43681454 #
9. pjmlp ◴[] No.43681454{3}[source]
C++26? There are having issues with delivering C++23, since the whole change in security focus with Rust, Go, C#, Java first, C and C++ for existing codebases, and most likely one of the reasons Herb Sutter is no longer at Microsoft.

https://developercommunity.visualstudio.com/t/Implement-C23-...

https://developercommunity.visualstudio.com/t/Implement-C26-...

Security changes,

https://azure.microsoft.com/en-us/blog/microsoft-azure-secur...

https://blogs.windows.com/windowsexperience/2024/11/19/windo...

replies(1): >>43687263 #
10. akdev1l ◴[] No.43686097[source]
I see. I kind of assumed improving the C++ compiler required improving the C parts as well.

VLA situation seems complex: https://stackoverflow.com/questions/55696680/in-which-versio...

11. HexDecOctBin ◴[] No.43687263{4}[source]
Oh wow, I don't write C++, so I didn't know how bad the situation was. My recollection that MSVC always implemented C++ standards posthaste is clearly outdated.

Yup, we are never getting C23. Good thing C11 is decent enough, I guess.

12. pjmlp ◴[] No.43703860[source]
The irony is that Microsoft was the very last MS-DOS compiler vendor to support C++ in their C tooling with Microsoft C/C++ 7 in 1992, that changed with the release of Visual C++ in 1993.