4 ms·
I know what he said. But I think he's understating the changes. Visual Studio 2013 supports both compound literals and designated initializers. That required c
by wahern 12y ago
I know what he said. But I think he's understating the changes.
Visual Studio 2013 supports both compound literals and designated initializers. That required core language changes, and are arguably the two biggest language changes in C99 from a syntax standpoint. Both were rejected by C++ and will never appear in C++, so they're entirely unnecessary.
See http://msdn.microsoft.com/en-us/library/hh409293.aspx http://msdn.microsoft.com/en-us/library/hh409293.aspx
See also http://blogs.msdn.com/b/vcblog/archive/2013/07/19/c99-library-support-in-visual-studio-2013.aspx http://blogs.msdn.com/b/vcblog/archive/2013/07/19/c99-librar...
And Visual Studio 2014 added most of the missing pieces, including a standards compliant snprintf. See http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-stu...
Heck, they even met C99 half-way on the restrict qualifier by adding a __restrict keyword. C++ also rejected restrict, FWIW.
Those are all comprehensive, non-trivial changes, and most are irrelevant to C++. Microsoft can talk it down however they want, but the new features speak for themselves.
I don't even use Visual Studio. Or Windows for that matter. But I value standards compliance and portability, and I was happy to see Microsoft change their mind on this. They did it rather quietly ("No, we aren't targeting C anymore, but here are almost all the new C features which we said we'd never support in a million years."), perhaps because they so adamantly refused to support it before.
Yes, the reason they finally capitulated is because there was simply too much open source C99 software in the wild, and it was becoming a pain point for Windows developers not being able to use that software with their preferred development environment--Visual Studio. But at this point they've implemented almost all the features that actually matter.
Features like VLAs and _Complex are rarely used, so I doubt Visual Studio will get that. But both are optional in C11 anyhow. With little effort--one of the biggest changes being _Generic--Visual Studio could become C11 compliant, at least in practice.
- pjmlp 12y agoThanks for pointing this out, it seems I missed some posts and need revise my statements. Still, I was a supporter of their decision, given the added safety and expressiveness that C++ has over C. System programming languages only get replaced when an OS vendor decides to push them aside from their SDKs.