5 ms·
No, I've read the standard. The "abstract machine" is, as its name implies, abstract. In reality, there are other concerns that are equally if not more importan
by userbinator 5y ago
No, I've read the standard. The "abstract machine" is, as its name implies, abstract. In reality, there are other concerns that are equally if not more important. That is the problem with compiler writers, ignoring those practical concerns. They prefer to downvote rather than face the reality of going outside their imaginary abstract machine world.
"In theory, theory and practice are the same. In practice, they are not."
- josephcsible 5y agoThe C standard can be thought of as a bunch of minimum requirements that program authors and compiler authors have to follow. What you seem to be arguing is for compiler authors to go above and beyond what's required of them, so that you as a program author can get away with doing less than the minimum that's required for you.
- userbinator 5y agoMe and everyone who has been subject to this "abuse" by compiler-writers stuck in their fantasy world.... including Linus Torvalds: https://news.ycombinator.com/item?id=17242103 https://news.ycombinator.com/item?id=17242103
- Gibbon1 5y agoReminds me once saw an comment about optimizing on UB by a compiler maintainer for Microsoft. He pointedly said the gcc maintainers would do better to work on their crummy code generation.
- astrange 5y agoAren't gcc/clang significantly better than MSVC? They're certainly better at safe code with tools like asan, and at least they support C99.
- pjmlp 5y agoNot updated with Visual Studio 2019? C11 and C17 are supported, minus C99 features made optional in C11. ASan is now in the box. And Visual Studio definitly provides a better experience of coupling static analysis with code being written.
- astrange 5y agoI am a bit behind. Sounds like a good update, since before it was effectively just a C++ compiler that implemented parts of C when it was convenient.
- pjmlp 5y agoOn the contrary, first of all there is no rule that requires a C++ compiler to also be a C compiler. Second, Microsoft considered C done on Windows, and green field systems programming should be done in C++, there were a couple of blog posts done about the subject, which apparently hater kept forgeting to read about. So no, it wasn't about when it was convenient, rather to the extent required by ISO C++ compliance. In fact, as per Microsoft Security Center advisory, C# or other managed languages, Rust or C++ with Core Guidelines, should be the main languages to use for new applications. Most likely they ended up backtracking with the goal to drop C support from Visual Studio due to pressure from high profile customers, WSL and FOSS code on Windows, or even the culture change brought by Satya.
- josephcsible 5y ago> On the contrary, first of all there is no rule that requires a C++ compiler to also be a C compiler. This is true, but an OS with no C compiler is horrifically bad. If Microsoft didn't want their C++ compiler to also be a C compiler, then they should have made a separate C compiler, instead of forcing people to rely on something like MinGW.
- pjmlp 5y agoThe compilers are separate, just like in most C and C++ compilers out there. There is hardly any reason to keep writing new C code in 2021 other than UNIX like codebases or embedded development that keeps resisting C++ adoption. I was actually disappointed with Microsoft's decision to backtrack on their decision.
- UncleMeat 5y agoAre those practical concerns universal and well aligned with the language's design goals?