Earlier quoted context omitted.
I'm going for C, because I am experienced with C and despite it being more tedious, with having to do everything yourself, I stick with it because the compile times, and in fact the compile process, are so much faster and simpler. I really enjoy the direct feedback I can get. I considered C++ but that too had terrible compile times. Ideally a debug build should simply not take longer than 100ms for a codebase that is…
I’m going for C because programming language choice is a matter of personal preference in essence and Rust annoys me.
C meeting is over. C23 added:
251–260 of 363 posts
Re: C meeting is over. C23 added:
#252Earlier quoted context omitted.
>Maybe in another 60 it will get proper strings and arrays. If you think this is missing, there's a big chance you don't "get" C. Also, if you don't know how to properly emulate strings in a safe way in C nowadays (for which plenty of code sample and librariesexist), your skills with the language are quite poor.
Adding so-called fat pointers to C that could be bounds checked would probably instantly eliminate a large fraction of all security issues. Of course, you can emulate these yourself, it's just a struct but not everyone does.
I think it would not be impossible for a C compiler to detect and produce a warning if an index used with such an array-pointer is not checked against the array-pointer's length variable.
This would not make bounds-checks automatic, but the use of these types could make compilers point out when bounds are not checked or checked incorrectly.
Re: C meeting is over. C23 added:
#253Earlier quoted context omitted.
Wow, that's annoying. There's a bunch of old code we have that'll need updating (written that way to keep the line lengths down).
...can't you just configure your build system to compile those modules with pre-c23 standard?
Re: C meeting is over. C23 added:
#254Earlier quoted context omitted.
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:
#255Earlier quoted context omitted.
C must be really amazing compared to Algol than. It powers today's computing infrastructure without having proper boolean type. Are there any widely used applications written in Algol?
The Burroughs MCP operating system and some applications written on top of that. In fact, I believe that was the very first OS to be written entirely in a high-level language. MCP is not today widely used in the same way, say, React or Linux is, but businesses used and depend on it such that it's still sold and supported, as Unisys ClearPath MCP.
Re: C meeting is over. C23 added:
#256Earlier quoted context omitted.
linked lists - true, but at least when you write them you'll be certain of what they do, and, coupled with knowledge of cache performance, precisely how bad they are. About reallocation I don't even mean the copying, but just the code needing to check for the chance overflow on every push. Besides the obvious waste of instructions to check for that, it also clobbers registers even if the branch isn't taken, and thus…
Branch prediction exists so the common case can be made very fast (much faster than jump to this remote pointer), and also, rust uses an optimizing compiler for a reason. Eg., you use a vector inside a for, the vector’s code can be inlined and the checking part be done only at the boundary. Also, one can also manually perform an unchecked push/get/whatever as well.
Unchecked operations are acceptable if your code has a single hot loop, but if you have a hundred small functions, each taking 1% of the time, you probably won't carefully examine every stdlib function each of them uses and write code to "work around" every unnecessary thing the stdlib does.
Yes, that's a ton of micro-optimization, but micro-optimization can bring a ton of speedup, so I'll take whatever makes it simpler (or not needed in the case where you already know what will happen due to having written it)
Re: C meeting is over. C23 added:
#257Earlier quoted context omitted.
The exception? It's standard practice for distros to compile with hardening flags, and if RH submits the bugs they find with Coverity upstream, that protects the 1000s of C projects they package.
Standard practice they say, https://googleprojectzero.blogspot.com/2021/12/this-shouldnt...
You have made dozens of negative (and sometimes rude) comments in this thread. I'm curious why you're spending so much time and energy being negative. If C isn't something you're interested in, why not just ignore it and move on?
Re: C meeting is over. C23 added:
#258Earlier quoted context omitted.
Why does it matter if compile time is 100ms or 300ms? At even a second, that’s going to be so negligible in the context of code-compile-debug work. Especially if something like a flash download is involved.
The compilation time difference between C and Rust for nontrivial projects is much bigger than 3x.
Re: C meeting is over. C23 added:
#259> In its London 2019 meeting, WG14 has found consensus to elevate false and true to proper keywords. The committee settled this over a beer, or some other substance? Because the elevation to a proper type is opportunistic at best, and against the spirit of C at worst. Next people celebrate this with the use of capslock. The futility of it all blows my mind :C
Can you explain what you mean by this?
Re: C meeting is over. C23 added:
#260For all of us that follow an "I do not want to log in to twitter" philosophy, can someone here please post an alternative link? Incidentally, I'm glad Twitter now blocks you from reading if not signed in. I'm hoping this will encourage the use of alternatives.