Live data from Hacker News

C meeting is over. C23 added:

twitter.com

221–230 of 363 posts

Re: C meeting is over. C23 added:

#221
post #187

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.

So does that mean we should expect C23 support in ~2033?

Re: C meeting is over. C23 added:

#222
post #209
post #179

Earlier 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.

I don't know what are you trying to say? How does this follow from the parent post?

Re: C meeting is over. C23 added:

#223
post #171
post #33

Earlier 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.

There are plenty of C compilers written in C. Large compiler suites for C/C++ are usually written in C++. But as a contributor to GCC, I can say that large parts of the code still look very much like C.

Re: C meeting is over. C23 added:

#224
post #86
post #64

Earlier 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…

Zig? I personally haven't used it, but based on what I've heard about it, it fulfills these criteria.

Re: C meeting is over. C23 added:

#225
post #179

Earlier 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).

I'm not arguing that it is not? It's funny though how many people saw value in C but not in Algol. Maybe C has something going for it?

Re: C meeting is over. C23 added:

#228
post #6

Earlier 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.

I'll rather have code that runs on an actual computer than code that should hypothetically run according to a long document that costs 60 dollars to read.

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...

Not only that, but the feature is genuinely useful.

Re: C meeting is over. C23 added:

#230
post #213
post #181

Earlier 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.

This tool helps as much with C (or even higher level languages) as it does with Assembly. It doesn't change the fact both languages work on the same abstract machine model.
Post reply on HN