News for hackers. Stuff that matters.
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by flohofwoe on Sunday July 09, 2023 @08:40AM (#36654004)
Tell me an alternative which ticks all the boxes and I'll switch immediately. C++ isn't it because the committee has completely lost focus since ca C++11, Rust isn't it because they completely forgot about ergonomics, simplicity and elegance on their quest to fix memory safety.

Zig looks perfect so far, but it's too early to switch over yet.

Any other candidates?

Re:“C is quirky, flawed, and an enormous success” – Dennis R... by 9659 on Sunday July 09, 2023 @09:01AM (#36654134)
Ada. 83 or 95
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by flohofwoe on Sunday July 09, 2023 @09:12AM (#36654193)
Interesting choice, but Ada is probably even less popular than Zig.

Even just requiring users to integrate my hypophetical Ada library source distribution into their project's build system files would most likely drown me in support tickets ;)

Re:“C is quirky, flawed, and an enormous success” – Dennis R... by pjmlp on Sunday July 09, 2023 @04:04PM (#36658319)
It certainly has more production deployments than Zig might ever get.
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by pjmlp on Sunday July 09, 2023 @04:05PM (#36658335)
We are in Ada 2012 nowadays, with Ada 202x getting finalized.

https://www.adaic.org/advantages/ada-202x/

Re:“C is quirky, flawed, and an enormous success” – Dennis R... by 9659 on Thursday July 13, 2023 @07:49PM (#36717640)
my point is either of these versions are very complete and usable implementations. more recent is even better.
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by versteegen on Sunday July 09, 2023 @09:09AM (#36654180)
You didn't say what the checkboxes are, but... perhaps the 'BetterC' subset of D? https://dlang.org/spec/betterc.html#retained

Or D itself if you don't need a language as minimal as C. D is basically C++ redesigned and now that GCC includes D support by default I wonder whether it'll gain popularity.

Re:“C is quirky, flawed, and an enormous success” – Dennis R... by flohofwoe on Sunday July 09, 2023 @09:19AM (#36654239)
Definitely an option, and D is actually one of the languages I haven't seriously looked into yet (or rather, I saw it as a C++ alternative in its heydays ca 2005 and that image stuck in my head - and at that time I hadn't been looking for a C++ alternative)

PS: my main use of C is currently to write platform abstraction libraries with minimal size and runtime overhead, so need to talk directly to operating system APIs, plus WASM is a very important target. The libraries must be usable from other languages via automatic bindings generation (quite simple with a C API). Also for performance-oriented stuff, direct control over memory layout and lifetimes please.

Also personal opinion from 20 years of C++ experience: high level abstractions never pay off in the long run. Simple imperative code always wins when it comes to "malleability".