Does anybody bother about the stuff after C99?
MSVC just got C11 support a little over a year ago, so you won't see many big cross-platform projects using it yet, unfortunately. Some projects can optionally use C11 stdatomic.h and stdalign.h to replace old OS and compiler-specific extensions, but most of them still keep fallback code in case C11 isn't available.
C meeting is over. C23 added:
221–230 of 363 posts
Re: C meeting is over. C23 added:
#222Earlier quoted context omitted.
You do realize there is a lot of C code out there which has nothing to do with UNIX. Although I do remember when you once claimed C requires UNIX like OS to run. :)
UNIX is to C like the Web is to JavaScript. JavaScript also runs outside of the browser nowadays, so what.
Re: C meeting is over. C23 added:
#223Earlier quoted context omitted.
How many of your preferred programming languages are written in C? Yes, many self-host, but a considerable number of them don't want the complications that can bring.
Modern C compilers are written in C++. So much for C's simplicity in writing compilers.
Re: C meeting is over. C23 added:
#224Earlier quoted context omitted.
C isn’t that small, compare it to a Zig hello world. Fast is relative — due to C not having good expressive/abstracting powers, it will leave you to inferior solutions, eg. counting string length multiple times at call sites, vs C++’s small string optimization, which is simply not possible in a user-ergonomic way in C. Regarding obviousness, I would add UB here, so Zig for example would beat it. C is not any closer t…
Are you going to mix all those languages into one project and somehow use their advantages but steer away from their disadvantages? Sure, other languages have caught up or have improved on some of the features where C shines. Let's remove portability and integration from the feature list, because that's strongly related to C's tenure. Which one of the languages you listed matches the rest of the feature set I brought…
Re: C meeting is over. C23 added:
#225Earlier quoted context omitted.
You do realize there is a lot of C code out there which has nothing to do with UNIX. Although I do remember when you once claimed C requires UNIX like OS to run. :)
Well, UNIX is surely responsible for C becoming popular (if not its being a thing in the first place).
Re: C meeting is over. C23 added:
#226Re: C meeting is over. C23 added:
#227Re: C meeting is over. C23 added:
#228Earlier quoted context omitted.
No one cares about the standards. We only care about getting things done by writing regular C code that works.
Huh? What do you think defines “regular C code that works”? Standards. Every compiler you have used operates at a bare minimum on the C standard. That’s why they are often advertised (if not GCC/Clang which are assumed to be up to date) as “C(89|99|11|17) compliant.” “Code that works” is code which is operates under constraints and guarantees specified by a standard, anything else is undefined or unportable.
Re: C meeting is over. C23 added:
#229> Support for calling realloc() with zero size (the behavior becomes undefined) OMG! Please do not add more undefined behaviour! We really need less UB, not more! What was wrong with 'implementation defined' as in C17? UB means that code that exists will now break if a new compiler decides that it can be smart. And we know how inventive this can get, right? Like removal of 'if(new_size==0) {...}' if the compiler can…
Where did you see this? I can't find it in the Twitter thread or any of the linked sources. I agree that "adding" support for something by making it UB makes no sense... as that generally would imply breaking forward-compatibility...
Re: C meeting is over. C23 added:
#230Earlier quoted context omitted.
Have you? I used to write device drivers mostly on ARM architectures and I have newer seen an instruction which would let me precisely control CPU instruction ordering or what it does with cache that I couldn't do in C.
That is why stuff like V-Tune exist with micro-ops profiler and pipeline debugging, maybe ARM should provide better tooling.