News for hackers. Stuff that matters.
Re:C Is Best by baranul on Tuesday January 06, 2026 @08:46AM (#46512163)
Every project and programmer shouldn't feel they have to justify their choice not to use Rust (or Zig), who seem to be strangely and disproportionately pushed on Hacker News and specific other social media platforms. This includes the pressure, though a bit less in recent years, to use OOP.

If they are getting good results with C and without OOP, and people like the product, then those from outside the project shouldn't really have any say on it. It's their project.

Re:C Is Best by misnome on Tuesday January 06, 2026 @08:56AM (#46512281)
> strangely and disproportionately pushed on Hacker News

There is literally nothing strange or disproportionate. It's incredibly obvious that new languages, that were designed by people who found older languages lacking, are of interest to groups of people interested in new applications of technology and who want to use their new languages.

> then those from outside the project shouldn't really have any say on it. It's their project.

People outside the project are allowed to say whatever the hell they want, the project doesn't have to listen.

Re:C Is Best by donkeybeer on Tuesday January 06, 2026 @10:23AM (#46513406)
I think it's more than just the normal amount for advocacy of a new language. Rust isn't the only "newer" language. I don't feel this kind of mentally strung pushing of say Kotlin or Scala or Go or, etc from their fans.
Re:C Is Best by bigfishrunning on Tuesday January 06, 2026 @10:38AM (#46513626)
I think this is because of the gap in its target market -- Rust is firmly positioned to replace C and C++, which have a long history of safety issues. Kotlin is positioned to replace java, and besides a few quality-of-life improvements, it changes some syntax but very few semantics, so the gap is much smaller. Go was originally pitched as a C or C++ replacement, and it's very nice for deeply parallel programs like web services, but its big runtime and its GC rule it out for a lot of (especially very low level or latency-critical) uses -- you don't see Go ported to microcontrollers for instance. I can't speak for Scala, because i don't have experience writing software in it.

To summarize, Rust provides a lot of compile-time discipline that C and C++ are lacking, and many people are tired of maintaining code that was developed without that discipline. Rust makes it harder to write low-effort software.

As a programmer that picks up a new language every 2-3 years (and one that is privileged to have an employer that tolerates this) Rust is really a breath of fresh air; not because it's easier, but because it codifies and enforces some good habits in ways that other languages don't.

Re:C Is Best by vips7L on Tuesday January 06, 2026 @11:21AM (#46514334)
There is no chance that Kotlin will replace Java. Java is the platform and Kotlin does change semantics. They’ve developed their own features that don’t align with the platform. Suspend functions vs virtual threads, data classes vs records, Kotlin value classes vs Java value classes. The gap is widening.
Re:C Is Best by b40d-48b2-979e on Tuesday January 06, 2026 @12:15PM (#46515196)
From my POV having worked at a giant 50,000 person tech org—primarily Java—Kotlin was the kick in the pants that ushered in a lot of changes in the post-Java 11 world. We were on the verge of migrating wholesale to Kotlin after our CTO wrote an internal whitepaper in favor of the direction.
Re:C Is Best by arghwhat on Tuesday January 06, 2026 @01:04PM (#46516012)
I don't agree.

First of all, Java isn't a platform. Kotlin and Java are both just languages, and Kotlin has explicit interoperability with Java exactly to make it easy for Java devs to "upgrade".

The JVM is a common target for both Java and Kotlin, where the two are intentionally interoperable - from the Kotlin-side, by virtue of explicit annotation. Both languages have other targets through other compilers, e.g., Kotlin's native backend and GraalVM.

The widening gap is not at all moving Kotlin further away from Java developers, but is just increasing the reasons to migrate. It is crucially not making interoperability with existing, legacy Java harder, just giving you more toys. Stuff like suspend functions vs. virtual threads only affects decision making in new application code, and you can for all intents and purposes use either depending on whether you're writing new Kotlin libs for a legacy Java app or a Kotlin app using legacy Java libs.

The C → Rust migrations that happen a lot these days underline how differences in features isn't at all a problem (quite the opposite when there's new features), but that interoperability allowing partial work is by far the most important thing.

Plus, considering that Android apps were responsible for a very significant portion of actively developed Java (I would assume quite a loand has with Android having gone full Kotlin, a quite significant portion of Java developers will either already have migrated or soon be migrating to follow suit. This will over time affect a quite significant portion of the available skill pool for hiring, which will add additional pressure on enterprise.

There will always be Java, but I'd expect a significant portion of actively developed applications (as opposed to maintenance-mode only applications) to slowly migrate to either Kotlin or something else entirely.

Re:C Is Best by vips7L on Tuesday January 06, 2026 @03:39PM (#46518347)
I think you're widely mistaken if you don't think Java is a platform. The VM and language are intertwined. The VM explicitly knows about things like records, language constructs, and idioms from Java. Java sets the direction of the VM, not Kotlin.
Re:C Is Best by arghwhat on Tuesday January 06, 2026 @07:40PM (#46521005)
JVM does not know about Java, it knows about an IR that Java, Kotlin, Scala, Closure, Groovy, etc. all target. Java as a language also doesn't know about JVM, as it commonly targets things that are not the JVM, whether that is Dalvik, Graal or something else entirely.

That the JVM and IR has features to help the Java compiler generate better output is obvious but not really relevant. Modern CPUs also have instructions to help C compiles generate better code, but that doesn't make them C platforms. It's just that implementation details.

So no, Java is not a platform. It is a language that sometimes runs on the JVM together with many other large and quite influential languages.

Re:C Is Best by locknitpicker on Tuesday January 06, 2026 @04:20PM (#46518957)
> First of all, Java isn't a platform.

You are being facetious. I mean, do you actually believe that the JVM exists in a context where Java does not exist? What does the J in JVM stand for?

> The JVM is a common target for both Java and Kotlin, where the two are intentionally interoperable (...)

Yes, in the sense that Java exists and Kotlin by design piggybacks on the JVM.

> The C → Rust migrations that happen a lot these days underline how differences in features isn't at all a problem (quite the opposite when there's new features), but that interoperability allowing partial work is by far the most important thing.

This analysis is very superficial and fails to identify any of the real world arguments to switch from C. For example, Microsoft outright strangled C by wasting many years refusing to support any standard beyond C89, in spite of being directly involved in it's drafts. This was a major contribution to address any of the pain points and DX shortcomings. Compare the evolution of C and C++ during that time period, and we see C++ going through the same path in the C++0x days to then recover spectacularly once C++11 got unstuck.

Re:C Is Best by arghwhat on Tuesday January 06, 2026 @07:52PM (#46521093)
> You are being facetious. I mean, do you actually believe that the JVM exists in a context where Java does not exist? What does the J in JVM stand for?

Java runs on several things that are not the JVM. Android does not use JVM to run Java, and even Oracle is pushing something that is not the JVM.

At the same time, JVM runs many things that are not Java.

If you are somehow implying along the lines of JVM only got initially authored because Java, then that is nothing but a historical fact of little relevance from the early days of the language. If not even Oracle considers Java and JVM one thing - and by virtue of Graal they don't - then it simply isn't as such.

> This analysis is very superficial and fails to identify any of the real world arguments to switch from C

You misread - what you quoted was not an analysis of why the migrations happen. It was a parallel, underlining that migrations do happen in spite of obvious feature differences (and sometimes, because of such differences).

Re:C Is Best by p2detar on Tuesday January 06, 2026 @01:39PM (#46516560)
I‘m in the process of migrating Kotlin code back to Java in our product. My experiment with Kotlin is over and I‘m sticking 100% with Java. I like writing Kotlin, but I dislike reading Kotlin code.
Re:C Is Best by guestbest on Tuesday January 06, 2026 @01:56PM (#46516800)
Strange how people never say this with swift and objc
Re:C Is Best by estimator7292 on Tuesday January 06, 2026 @04:59PM (#46519455)
Probably because almost everyone avoids those languages at all costs
Re:C Is Best by orthoxerox on Tuesday January 06, 2026 @01:53PM (#46516767)
Yeah, Kotlin is stuck in an uncomfortable position, like F# is in the .NET world. It has pioneered several important features, but now the big brother has implemented them slightly differently and people demand interop from you.

At least Kotlin can theoretically retreat to Android.

Re:C Is Best by vips7L on Tuesday January 06, 2026 @03:47PM (#46518458)
I did a decent amount of AoC this year in F#. I felt it was more verbose than I would have expected. There were a lot of things that helped brevity; I really liked type definitions, unless I was using OO features where it was extremely verbose to define members. I also really didn't like having to to Seq.map or List.filter for everything instead of just calling methods off of the seq or list.
Re:C Is Best by munksbeer on Tuesday January 06, 2026 @11:07AM (#46514118)
Out of interest

> As a programmer that picks up a new language every 2-3 years (and one that is privileged to have an employer that tolerates this)

does this mean they allow you to tinker around on your own for this, or do you actually then start to deploy things to production written in the new language.

After having quite a long career as a programmer, I realised that if I were ever CTO at a startup, unless there was an absolute proven need to switch languages, I'd mandate only a single language for our (back end) stack. The cost of supporting different languages is just too high.

Re:C Is Best by bigfishrunning on Tuesday January 06, 2026 @11:21AM (#46514339)
I do deploy things in different languages -- We are a small team of open-minded programmers, and we are on a constant search for better tools and methods. I work for a robotics company (and have for many years), and having the flexibility to use Pion WebRTC (in Go) or PCL (in C++) or PyTorch (in Python) outweighs the cost of having software written in multiple languages.
Re:C Is Best by locknitpicker on Tuesday January 06, 2026 @04:29PM (#46519085)
> I do deploy things in different languages -- We are a small team of open-minded programmers, and we are on a constant search for better tools and methods.

This claim does not pass the smell test. Tech sprawl is a widely recognized problem, and dumping codebases each 2-3 years is outright unthinkable and pure madness. It doesn't even come across as resume-driven development because 3 years is not nearly enough to get anyone at a proficient level.

This claim is so outlandish that I'm inclined to dismiss it entirely as completely made-up. There is no project manager in the world who would even entertain this thought.

Re:C Is Best by bigfishrunning on Wednesday January 07, 2026 @08:43AM (#46526280)
Your world seems small -- I never said anything about dumping codebases. If i have a library implemented in Rust, which gets called by a program written in C++ through FFI, and contacts a service which is implemented in python, I don't need to dump or waste any old work. A carpenter that only uses a hammer isn't a very good carpenter; different tools have different strengths and weaknesses.
Re:C Is Best by shevy-java on Tuesday January 06, 2026 @10:55AM (#46513918)
Kotlin won't replace Java. They do not have the same niche.
Re:C Is Best by giancarlostoro on Tuesday January 06, 2026 @12:53PM (#46515831)
Kotlin's Niche was to replace LEGACY Java with something that builds for older versions of Java but also gives you features and ergonomics not available for those features. There's a ton of super legacy Java out there.
Re:C Is Best by locknitpicker on Tuesday January 06, 2026 @04:32PM (#46519114)
> Kotlin won't replace Java. They do not have the same niche.

Claiming Java has a niche is very funny. I guess the niche is programmable computers? Well done.

Re:C Is Best by tonyplee on Tuesday January 06, 2026 @10:50AM (#46513835)
Love to see an AI agent to auto transpile C (sqlite, apache, nginx, mariadb, etc) into rust and run all the regression associated tests and perf benchmarks and produce report on the porting processes and perf delta.
Re:C Is Best by nindalf on Tuesday January 06, 2026 @12:22PM (#46515330)
Sqlite's test suite is closed source, so no one other than the Sqlite authors can attempt that. That said, you may be interested in this attempt by Turso to rewrite Sqlite in Rust (https://turso.tech/blog/we-will-rewrite-sqlite-and-we-are-go...). They're not using AI, but they are using some novel ways to test their code.
Re:C Is Best by 9rx on Tuesday January 06, 2026 @10:56AM (#46513941)
> I think this is because of the gap in its target market

Surely that gap has been filled for at least a decade, even if only by Rust itself?

Moreover, I am not sure that serves as an explanation as it shows up in the strangest places. As you mention Go: Visit any discussion about Go and you'll find some arbitrary comment about Rust, even though, as you point out, they don't even exist in the same niche; being different tools for different jobs.

> Go was originally pitched as a C or C++ replacement

It was originally imagined that it would replace C++ for network servers at Google. The servers part was made abundantly clear. In fact, the team behind it expressed quite a lot of surprise that it eventually found a home doing other things as well.

> you don't see Go ported to microcontrollers for instance.

You don't? https://tinygo.org

Re:C Is Best by bigfishrunning on Tuesday January 06, 2026 @11:13AM (#46514214)
> Surely that gap has been filled for at least a decade, even if only by Rust itself?

I think this is the argument made by the "Rust Evangelism Task Force" -- that Rust provides the features that C and C++ are missing. What i meant by "gap" is "the distance between C or C++ and Rust is greater then the distance between C++ and Go (in Go's target use case) or between Java and Kotlin". For the record, I do think all of these languages are great; I'm just trying to reason out the "rewrite it in Rust" mantra that has taken hold in many online communities, including this one.

> You don't? https://tinygo.org

I wasn't aware of this, thank you.

Re:C Is Best by 9rx on Tuesday January 06, 2026 @12:56PM (#46515891)
> the distance between C or C++ and Rust is greater then the distance between C++ and Go (in Go's target use case) or between Java and Kotlin

What, exactly, does distance mean here?

The other explicitly told design consideration for Go was for it to "feel like a dynamically-typed language with statically-typed performance". In other words, the assumption was that Googlers were using C++ for network servers not because of C++, but because something like Python (of which Google was the employer of van Rossum at the time!) was too slow. Go was created to offer something more like Python but with performance more like C++. It was a "C++ replacement" only in the sense that C++ is what Google was using where it was considered the "wrong tool for the job". Keep in mind that Go was created before we knew how to make actually dynamically-typed languages fast.

Putting things into perspective, the distance between C++ and Go is approximately the same as the distance between C++ and Python. Which is a pretty big distance, I'd say. C, C++, and Rust are much closer. They are all trying to do essentially the same thing, with Rust only standing out from the other two thanks to its at-the-time unique memory model. So it is apparent that we still don't understand "gap" to mean the same thing.

Re:C Is Best by elbear on Tuesday January 06, 2026 @01:44PM (#46516625)
How I interpret his comment about the distance: The benefit of switching from C/C++ to Rust is higher than switching from C++ to Go (in the similar use-cases) or from Java to Kotlin.

Another argument offered for Rust is that it's high-level enough that you can also use it for the web (see how many web frameworks it has). So I think that Rust's proponents see it as this universal language that could be good for everything.

Re:C Is Best by 9rx on Tuesday January 06, 2026 @02:02PM (#46516901)
> The benefit of switching from C/C++ to Rust is higher than switching from C++ to Go

Ten years ago the memory model was a compelling benefit, sure, but nowadays we have Fil-C, that C++ static analyzer posted here yesterday, etc. There is some remaining marginal benefit that C and C++ still haven't quite caught up with yet, but is that significantly smaller and continually shrinking gap sufficient to explain things as they stand today?

You are right that the aforementioned assumption did not play out in the end. It turns out that C++ developers did, in fact, choose C++ because of C++ and would have never selected Python even if Python was the fastest language out there. Although, funnily enough, a "faster Python" ended up being appealing to Python developers so Go does ultimately have the same story, except around Python (and Ruby) instead of C++.

> Another argument offered for Rust is that it's high-level enough that you can also use it for the web

It was able to do that ten years ago just as well. That doesn't really explain things either.

Re:C Is Best by smj-edison on Tuesday January 06, 2026 @07:10PM (#46520785)
> Keep in mind that Go was created before we knew how to make actually dynamically-typed languages fast.

Would you mind elaborating on this? The strongtalk heritage of VMs has been around for a while now, and certainly before go was started.

Re:C Is Best by wang_li on Tuesday January 06, 2026 @11:22AM (#46514365)
>To summarize, Rust provides a lot of compile-time discipline that C and C++ are lacking, and many people are tired of maintaining code that was developed without that discipline. Rust makes it harder to write low-effort software.

This doesn't explain why so many rust activists are going to projects they have no involvement in and demanding they be rewritten in rust.

What's happening is that there are progressive minded people who have progressive minded tactics, where they have a cause and everywhere they go they push their cause regardless of whether the places they are going have anything to do with their cause.

Re:C Is Best by fauigerzigerk on Tuesday January 06, 2026 @11:46AM (#46514704)
Is it really activism though, i.e. a concerted effort to put pressure on project leaders and make actual "demands"? Or is it just the occasional young Rust enthusiast asking questions or making the case for Rust?
Re:C Is Best by zavec on Tuesday January 06, 2026 @12:02PM (#46514954)
You haven't been getting the checks? Bring that up at our next secret cabal meeting.
Re:C Is Best by cozzyd on Wednesday January 07, 2026 @08:25PM (#46535860)
They're borrow checks
Re:C Is Best by uecker on Tuesday January 06, 2026 @12:49PM (#46515768)
Probably something in-between: a self-organizing cult with too much support from industry.
Re:C Is Best by giancarlostoro on Tuesday January 06, 2026 @12:50PM (#46515793)
Carbon is what could someday be a real successor to C++ in my eyes. It actually focuses on being compatible with C++ code similar to how Kotlin can work with Java directly, except it will make a lot more sense once it is stable and usable, I just hope its not a 'forever-project' like Fuchsia.
Re:C Is Best by baranul on Tuesday January 13, 2026 @06:25PM (#46609960)
Good point. Many of these other languages claim to be "successors", but are really C++ alternatives, that can have very different programming philosophies, goals, and use cases.
Re:C Is Best by thesz on Tuesday January 06, 2026 @02:05PM (#46516953)

  > you don't see Go ported to microcontrollers for instance.
AVRGo disagrees: https://github.com/avrgo-org/avrgo
Re:C Is Best by fclairamb on Wednesday January 07, 2026 @03:54AM (#46524120)
No commit for 7 years but https://tinygo.org/docs/reference/microcontrollers/ is up to date.
Re:C Is Best by baranul on Tuesday January 13, 2026 @06:31PM (#46610031)
Not sure what you mean, because tinygo is significantly active[1].

[1] https://github.com/tinygo-org/tinygo (latest release was a month ago from this post)

Re:C Is Best by arroquw on Tuesday January 06, 2026 @03:47PM (#46518445)
Actually, GO is ported to microcontrollers with Tinygo. Even u-root works on microcontrollers nowadays.

For the more bulky processors, there's also tamago.

Re:C Is Best by locknitpicker on Tuesday January 06, 2026 @04:13PM (#46518853)
> I think this is because of the gap in its target market -- Rust is firmly positioned to replace C and C++, which have a long history of safety issues.

The "long history of safety issues" is actually a combination of being extremely successful (the world runs on C and C++) and production software always featuring bugs.

The moment Rust started to gain some traction, we immediately started seeing CVEs originating from Rust code.

Re:C Is Best by lenkite on Wednesday January 07, 2026 @05:03AM (#46524565)
Java has features that Kotlin does not have. Virtual Threads and the API's that support then are effectively incompatible with the Kotlin co-routine libraries.
Re:C Is Best by simon_void on Thursday January 08, 2026 @03:00AM (#46538509)
technically, Kotlin can use VirtualThreads like it can use any other Java Api (when being compiled to JVM bytecode).[1] If I remember correctly the Kotlin team was e.g. thinking about implementing a Coroutine Dispatcher with VirtualThreads. So building a Kotlin service that uses Virtual Threads instead of coroutines is -in principle- possible. But if you've got a Java project using Virtual Threads you could rewrite it slowly -class for class- to Kotlin (and later probably refactor the VirtualThreads to coroutines). What you have to keep in mind though: if you're creating a Kotlin lib that is meant to be used by Java then the public Api of this lib should include suspend functions! My company made that mistake at some point, they ordered a lib from an external supplier and since Java and Kotlin are both first class languages and "Kotlin is compatible with Java", they ordered this lib in Kotlin. They learned the hard way that Kotlin suspend methods translate to Java methods returning a Continuation class (!? If I remember correctly. I wasn't part of that project, but heard their story) which is very unergonomic to use manually. The fix was to write a small Kotlin shim lib that wrapped the other lib and replaced every suspend function with a normal function invoking their suspend counterpart in a runBlocking-block (I think). Hardly ideal, but workable. So yes, writing a Kotlin lib that's (also) meant to be consumed from Java requires more thought than one that is only meant to be used by Kotlin. (There is functionality in Kotlin to help with this though, e.g. look up the annotations @JvmStatic, @JvmName, @JvmRecord.)

[1] https://void2unit.onrender.com/post/virtualthreads-in-kotlin...

Re:C Is Best by hulitu on Wednesday January 07, 2026 @04:45PM (#46533425)
> Rust is firmly positioned to replace C and C++

I can't wait to see results. Until now, the only real world usage was for coreutils in Ubuntu, with disastrous consequences.

Anyway, without writing the OS in Rust, Rust will always be a second tier language.

Re:C Is Best by steveklabnik on Wednesday January 07, 2026 @04:52PM (#46533555)
> Until now, the only real world usage was for coreutils in Ubuntu,

This is simply not true, there are millions of lines of Rust code running in production at the largest tech companies in the world.

Re:C Is Best by umanwizard on Wednesday January 07, 2026 @10:12PM (#46536736)
> I can't wait to see results. Until now, the only real world usage was for coreutils in Ubuntu

I spent five years working at a company (Materialize) whose main product is entirely in Rust. Since then I work at a company (Polar Signals) where sadly I have to use C and Go, but the main backend storage layer is in Rust. And several of our customers use Rust and it would be a show-stopping bug for them if our product stopped working on Rust codebases.

Besides all that, plenty of companies you’ve heard of are now writing large amounts of new code in Rust — most notably Meta and Amazon. Large parts of Firefox are in Rust and have been for years.

Ubuntu coreutils is underselling it a bit.

Re:C Is Best by webnrrd2k on Tuesday January 06, 2026 @12:07PM (#46515034)
Yeah, Julia was all the rage for a while, and that kind of disappeared.

Some languages, like elixir, stick around with a low-volume, but consistently positive mention on HN. Which makes me want to use it more.

Re:C Is Best by morcus on Tuesday January 06, 2026 @11:00AM (#46514014)
I'm not a Rust evangelist, but I'm glad that Rust evangelists exist.

I decided to try it for a medium-sized (~10k LoC) performance sensitive component recently and it has been an absolute joy to use.

Re:C Is Best by mring33621 on Tuesday January 06, 2026 @11:35AM (#46514535)
I'm mostly a Java dev, but baby-stepping Rust has been a lot of fun and reminds me, in a very good way, of the feeling I had in the late 90's when I was first learning Java.
Re:C Is Best by benrutter on Tuesday January 06, 2026 @11:09AM (#46514154)
I think that's true - but I guess Rust and Zig are unique in that list on being new memory-managed languages (i.e. without garbage collectors).

Low level memory-managed languages have been C and C++ mostly for a really long time, so I think Rust and Zig probably seem "more new" than the likes of Kotlin, Go, Elixir, Gleam, etc.

Re:C Is Best by halfmatthalfcat on Tuesday January 06, 2026 @10:45AM (#46513740)
Can I start then with Scala - it's my favorite language and easily has the best of both OO and functional worlds with insanely useful libraries to express code ergonomically. EVERYBODY SHOULD USE IT!
Re:C Is Best by vips7L on Tuesday January 06, 2026 @11:17AM (#46514283)
Nah it’s too complex, has shipped too many breaking changes, and the community sucks.
Re:C Is Best by icedchai on Tuesday January 06, 2026 @11:24AM (#46514395)
I worked on a Scala project about 15 years ago and it definitely felt overly complex. Similar to early C++, everyone used their own dialect.
Re:C Is Best by halfmatthalfcat on Tuesday January 06, 2026 @11:18AM (#46514304)
Always gotta get my yum yucked.
Re:C Is Best by vips7L on Tuesday January 06, 2026 @11:22AM (#46514361)
Just been screwed too many times I guess. I do like it more than Kotlin though. The language is powerful.
Re:C Is Best by shevy-java on Tuesday January 06, 2026 @10:55AM (#46513911)
Yeah, I agree with this observation. Not sure why Rust is different here though.
Re:C Is Best by stouset on Tuesday January 06, 2026 @01:15PM (#46516188)
Go has already more or less won its target market. Rust proponents are still working to convince C and C++ holdouts, who are understandably skeptical given the past several decades of promised replacements that never materialized.
Re:C Is Best by gf000 on Tuesday January 06, 2026 @03:08PM (#46517902)
Rust is absolutely novel in being the first, production-grade memory-safe low-level language.
Re:C Is Best by array_key_first on Tuesday January 06, 2026 @04:51PM (#46519383)
Well that's because C, and C++, are uniquely awful and Rust can actually take them on.

Kotlin doesn't have a strong case for replacing java because java is, well, just fine. At least it's safe. Sure it's, like, slightly inconvenient sometimes.

And other languages like Go which originally claimed to take on C and C++ just don't. Go is garbage collected, it's not a real competition.

But Rust is different. It's actually safe, and it's actually a real competitor. There's basically zero reason to choose C other than "I know it" or "one of my library author's knows it". Which are both very good reason, but incidently have nothing to do with the language itself.

Re:C Is Best by LexiMax on Tuesday January 06, 2026 @09:53PM (#46521970)
> I think it's more than just the normal amount for advocacy of a new language.

More than C++? More than Java? More than Python?

Re:C Is Best by metalliqaz on Tuesday January 06, 2026 @12:17PM (#46515236)
And here I was just reading in another thread that HN was so much less toxic than other places...
Re:C Is Best by alexpadula on Tuesday January 06, 2026 @12:38PM (#46515567)
Where do you see people having toxic debates?
Re:C Is Best by hu3 on Tuesday January 06, 2026 @09:25AM (#46512643)
I understand "shouldn't really have any say on it" as shouldn't expect to infuence the project. Not that they are not allowed to say anything.

Otherwise they would have written something along the lines of "shouldn't say anything about it".

Re:C Is Best by shevy-java on Tuesday January 06, 2026 @10:54AM (#46513899)
I am pretty certain Rust is pushed more than other languages. Whether warranted or not is another topic, but I think the OP has a point here.
Re:C Is Best by arghwhat on Tuesday January 06, 2026 @10:15AM (#46513311)
> People outside the project are allowed to say whatever the hell they want, the project doesn't have to listen.

Within reason - don't be a dick and all that. :)

Re:C Is Best by whatamidoingyo on Tuesday January 06, 2026 @09:21AM (#46512590)
"having a say on something", in OP's context, means authority and influence over decisions... People can say whatever they want, yes, but not everyone can "have a say on something".
Re:C Is Best by lelanthran on Tuesday January 06, 2026 @09:25AM (#46512646)
> People outside the project are allowed to say whatever the hell they want,

And? GP didn't say that they shouldn't.

Re:C Is Best by coliveira on Tuesday January 06, 2026 @09:56AM (#46513039)
> People outside the project are allowed to say whatever the hell they want

What these people do is a disservice to the general open source community, by spreading misinformation and general FUD about critical software that uses C and C++.

Re:C Is Best by ashtonshears on Tuesday January 06, 2026 @10:26AM (#46513447)
Rust is pushed on the internet
Re:C Is Best by guywithahat on Tuesday January 06, 2026 @11:29AM (#46514467)
I definitely wouldn't say internet, I think it's popular on HN and a few other online forums. There are a lot of X/twitter circles which make are critical of rust, as well as other sites.

In my mind at least there's a decent risk Rust is going to end up like the next Haskell, its benefits other than safety are not that clear and many of those features can and have been replicated in other languages.

Re:C Is Best by josephg on Tuesday January 06, 2026 @12:51PM (#46515802)
Many of its biggest benefits of rust come directly from other languages - including Haskell. Like, rust’s Option is identical to Haskell’s Maybe type. Traits are similar to type classes in Haskell, or interfaces in Go.

In my mind, the thing that makes rust and zig nice are that they put modern language features in a systems language. Non-nullable pointers and match expressions in a language that runs as fast as C? Yes please.

I love rust, but I personally doubt rust will ever be anywhere near as popular as Python, go, JavaScript and C#. It’s just so complex and difficult to learn. But its niche is pretty clear to me: I see it as a tool for writing beautiful, correct, memory safe, performant systems code. I used to love C. But between zig, rust and Odin, I can’t see myself ever using it again. C is just so much less productive and less pleasant to use than more modern languages.

Re:C Is Best by locknitpicker on Tuesday January 06, 2026 @01:53PM (#46516770)
> There is literally nothing strange or disproportionate. It's incredibly obvious that new languages, that were designed by people who found older languages lacking, are of interest to groups of people interested in new applications of technology and who want to use their new languages.

This is a disingenuous opinion. The level of militance involved in this propaganda push goes way beyond mere interest. Just look at people who actually enjoy Java, C++, Python, etc. These are the most popular languages that mankind ever developed,and countless people built very successful careers around them. Yet, you don't see even a fraction of the fanboys you see constantly pushing these experimental languages.

Re:C Is Best by antirez on Tuesday January 06, 2026 @09:58AM (#46513064)
It is also worth to note that the Rust design, in its theory, and the recent bug in the Linux kernel Rust code (the message passing abstraction used by Android), makes clear that:

1. With Rust, you may lower the exposure, but the same classes of bug still remain. And of course, all the other non memory related bugs.

2. With C you may, if you wish, develop a big sensibility to race conditions, and stay alert. In general it is possible that C programmers have their "bugs antenna" a bit more developed than other folks.

3. With Rust, to decrease the "unsafe" sections amount, you need often to build abstractions that may be a bit unnatural.

4. Rust may create a false sense of security, and in the unsafe sections the programmer sometimes, when reviewing the code, is falsely convinced by the mandatory SAFETY comment. Like in the Linux Kernel bug, where such comment was hallucinated by a human that sometimes (not sure in this specific case, it's just an example) may be less used to do the "race spotting" process that C learns you to do.

5. With Rust, in case of a bug, the fix could no longer be the one-liner usually you see in C fixes, and can make the exposure time window larger. Sometimes fixing things in Rust means refactoring in non trivial ways.

6. With C, if there was the same amount of effort in creating wrappers to make kernel programming safer at the cost of other things, the surface of attack could also be lowered in a significant way (see for instance Redis use of sds.c: how many direct strings / pointers manipulation we avoid? The same for other stuff of course). Basically things like sds.c let you put a big part of the unsafe business in a self contained library.

So, is Rust an interesting language for certain features it has? Yes. Is Rust a silver bullet? No. So should Rust be "pushed" to others, hell no, and I suggest you to reply in the most firm way to people stressing you out to adopt Rust at all the costs.

Re:C Is Best by tasn on Tuesday January 06, 2026 @10:20AM (#46513372)
The recent bug in the Linux kernel Rust code, based on my understanding, was in unsafe code, and related to interop with C. So I wouldn't really classify it as a Rust bug. In fact, under normal circumstances (no interop), people rarely use unsafe in Rust, and the use is very isolated.

I think the idea of developers developing a "bugs antenna" is good in theory, though in practice the kernel, Redis, and many other projects suffer from these classes of bugs consistently. Additionally, that's why people use linters and code formatters even though developers can develop a sensitivity to coding conventions (in fact, these tools used to be unpopular in C-land). Trusting humans develop sensibility is just not enough.

Specifically, about the concurrency: Redis is (mostly) single-threaded, and I guess that's at least in part because of the difficulty of building safe, fast and highly-concurrent C applications (please correct me if I'm wrong).

Can people write safer C (e.g. by using sds.c and the likes)? For sure! Though we've been writing C for 50+ years at this point, at some point "people can just do X" is no longer a valid argument. As while we could, in fact we don't.

Re:C Is Best by pjdesno on Tuesday January 06, 2026 @11:12AM (#46514210)
> was in unsafe code, and related to interop with C

1) "interop with C" is part of the fundamental requirements specification for any code running in the Linux kernel. If Rust can't handle that safely (not Rust "safe", but safely), it isn't appropriate for the job.

2) I believe the problem was related to the fact that Rust can't implement a doubly-linked list in safe code. This is a fundamental limitation, and again is an issue when the fundamental requirement for the task is to interface to data structures implemented as doubly-linked lists.

No matter how good a language is, if it doesn't have support for floating point types, it's not a good language for implementing math libraries. For most applications, the inability to safely express doubly-linked lists and difficulty in interfacing with C aren't fundamental problems - just don't use doubly-linked lists or interface with C code. (well, you still have to call system libraries, but these are slow-moving APIs that can be wrapped by Rust experts) For this particular example, however, C interop and doubly-linked lists are fundamental parts of the problem to be solved by the code.

Re:C Is Best by kibwen on Tuesday January 06, 2026 @11:47AM (#46514722)
> If Rust can't handle that safely (not Rust "safe", but safely), it isn't appropriate for the job.

Rust is no less safe at C interop than using C directly.

Re:C Is Best by hirvi74 on Tuesday January 06, 2026 @01:55PM (#46516791)
(Not the user you were replying to)

If Rust is no less safe than C in such a regard, then what benefit is Rust providing that C could not? I am genuinely curious because OS development is not my forte. I assume the justification to implement Rust must be contingent on more than Rust just being 'newer = better', right?

Re:C Is Best by gf000 on Tuesday January 06, 2026 @03:31PM (#46518228)
It's not less safe in C interop. It is significantly safer at everything else.
Re:C Is Best by smj-edison on Tuesday January 06, 2026 @07:14PM (#46520820)
As long as you keep C pointers as pointers. The mutable aliasing rules can bite you though.
Re:C Is Best by Ygg2 on Tuesday January 06, 2026 @12:19PM (#46515274)
> This is a fundamental limitation

Not really. Yeah you need to reach into unsafe to make a doubly linked list that passes borrow checker.

Guess what. You need unsafe implementation to print to console. Doesn't mean printing out is unsafe in Rust.

That's the whole point of safe abstraction.

Re:C Is Best by josephg on Tuesday January 06, 2026 @01:05PM (#46516033)
I love rust, but C does make it a lot easier to make certain kinds of container types. Eg, intrusive lists are trivial in C but very awkward in rust. Even if you use unsafe, rust’s noalias requirement can make a lot of code much harder to implement correctly. I’ve concluded for myself (after a writing a lot of code and a lot of soul searching) that the best way to implement certain data structures is quite different in rust from how you would do the same thing in C. I don’t think this is a bad thing - they’re different languages. Of course the best way to solve a problem in languages X and Y are different.

And safe abstractions mean this stuff usually only matters if you’re implementing new, complex collection types. Like an ECS, b-tree, or Fenwick tree. Most code can just use the standard collection types. (Vec, HashMap, etc). And then you don’t have to think about any of this.

Re:C Is Best by Ygg2 on Monday January 12, 2026 @09:48AM (#46589249)
> I love rust, but C does make it a lot easier to make certain kinds of container types.

Ok. But making it easier or harder isn't the same as making it impossible.

To quote GP:

> 2) I believe the problem was related to the fact that Rust can't implement a doubly-linked list in safe code.

Rust can implement doubly linked list in safe code. It can. It wraps the unsafe parts in an abstract manner.

Re:C Is Best by josephg on Tuesday January 13, 2026 @06:03PM (#46609674)
> Rust can implement doubly linked list in safe code. It can. It wraps the unsafe parts in an abstract manner.

As far as I know, only with Rc / RefCell. But that has a significant performance cost.

Am I wrong? I'd love to see an example / benchmarks.

Re:C Is Best by staticassertion on Tuesday January 06, 2026 @03:35PM (#46518303)
The issue is unrelated to expressing linked lists, it's related to race conditions in the kernel, which is one of the hardest areas to get right.

This could have happened with no linked lists whatsoever. Kernel locks are notoriously difficult, even for Linus and other extremely experienced kernel devs.

Re:C Is Best by j-krieger on Wednesday January 14, 2026 @07:26PM (#46626120)
For 1) The necessary safety guarantees downgrade to the level available in C all the time.
Re:C Is Best by pclmulqdq on Tuesday January 06, 2026 @10:25AM (#46513435)
I hear "people rarely use unsafe rust" quite a lot, but every time I see a project or library with C-like performance, there's a _lot_ of unsafe code in there. Treating bugs in unsafe code as not being bugs in rust code is kind of silly, also.
Re:C Is Best by pdimitar on Tuesday January 06, 2026 @12:10PM (#46515094)
For your last sentence, I believe topics are conflated here.

Of course if one writes unsafe Rust and it leads to a CVE then that's on them. Who's denying that?

On the other hand, having to interact with the part of the landscape that's written in C mandates the use of the `unsafe` keyword and not everyone is ideally equipped to be careful.

I view the existence of `unsafe` as pragmatism; Rust never would have taken off without it. And if 5% of all Rust code is potentially unsafe, well, that's still much better than C where you can trivially introduce undefined behavior with many built-in constructs.

Obviously we can't fix everything in one fell swoop.

Re:C Is Best by nec4b on Tuesday January 06, 2026 @12:42PM (#46515644)
>>Of course if one writes unsafe Rust and it leads to a CVE then that's on them. >>Who's denying that?

>>The recent bug in the Linux kernel Rust code, based on my understanding, was >>in unsafe code, and related to interop with C. So I wouldn't really classify >>it as a Rust bug.

Sometimes it's good to read the whole thread.

Re:C Is Best by pdimitar on Tuesday January 06, 2026 @12:46PM (#46515722)
I did and it does not quite compute. That was glue code, related to interoperating with C. Not a "normal" everyday Rust code. It's an outlier.

Helps to read and ingest context.

Though I do agree that in the strictest of technical senses it's indeed a "Rust" bug, as in: bug in code written in Rust.

Re:C Is Best by pclmulqdq on Tuesday January 06, 2026 @01:50PM (#46516732)
The bug in question is in rust glue code that interfaces with a C library. It's not in the rust-C interface or on the C side. If you write python glue code that interfaces with numpy and there's a bug in your glue, it's a python bug not a numpy bug.
Re:C Is Best by pdimitar on Tuesday January 06, 2026 @01:55PM (#46516795)
I already agreed that technically it is indeed a bug in the Rust code. I would just contest that such a bug is representative is all. People in this thread seem way too eager to extrapolate which is not intellectually curious or fair.
Re:C Is Best by pclmulqdq on Tuesday January 06, 2026 @02:07PM (#46516977)
Nobody is extrapolating from this bug to the rest of rust. The comment I responded to initially was denying that this was a rust bug.
Re:C Is Best by pdimitar on Tuesday January 06, 2026 @02:15PM (#46517098)
You and a few others don't -- I did not make that clear, apologies. It's disheartening that a good amount of others do.
Re:C Is Best by nec4b on Tuesday January 06, 2026 @02:12PM (#46517053)
Why is glue code not normal code in Rust? I don't think anyone else would say that for any other language out there. Does it physically pain you to admit it's a bug in Rust code? I write bugs in all kind of languages and never feel the need for adjectives like "technical", "normal", "everyday" or words like "outlier" to make me feel not let down by the language of choice.
Re:C Is Best by pdimitar on Tuesday January 06, 2026 @02:30PM (#46517344)
I have worked with Rust for ~3.5 years. I had to use the `unsafe` keyword, twice. In that context it's definitely not everyday code. Hence it's difficult to use that to gauge the language and the ecosystem.

Of course it's a bug in Rust code. It's just not a bug that you would have to protect against often in most workplaces. I probably would have allowed that bug easily because it's not something I stumble upon more than once a year, if even that.

To that effect, I don't believe it's fair to gauge the ecosystem by such statistical outliers. I make no excuses for the people who allowed the bug. This thread is a very good demonstration as to why: everything Rust-related is super closely scrutinized and immediately blown out of proportion.

As for the rest of your emotionally-loaded language -- get civil, please.

Re:C Is Best by nec4b on Tuesday January 06, 2026 @05:47PM (#46519930)
I don't care if there can be a bug in Rust code. It doesn't diminish the language for me. I don't appreciate mental gymnastics when evidence is readily available and your comments come out as compulsive defense of something nobody was really is attacking. I'm sorry for the jest in the comments.
Re:C Is Best by pdimitar on Tuesday January 06, 2026 @05:51PM (#46519962)
I did latch onto semantics for a little time, that much is true, but you are making it look much worse than it is. And yes I get a PTSD and an eye-roll-syndrome from the constant close scrutiny of Rust even though I don't actively work with it for a while now. It gets tiring to read and many interpretations are dramatically negative for no reason than some imagined "Rust zealots always defending it" which I have not seen in a long time here on HN.

But you and me seem to be much closer in opinion and a stance than I thought. Thanks for clarifying that.

Re:C Is Best by antirez on Tuesday January 06, 2026 @10:27AM (#46513463)
Exactly. You don't need much unsafe if you use Rust to replace a Python project, for instance. If there is lower level code, high performances needs, things change.
Re:C Is Best by kibwen on Tuesday January 06, 2026 @10:37AM (#46513619)
For replacing a Python project with Rust, unsafe blocks will comprise 0% of your code. For replacing a C project with Rust, unsafe blocks will comprise about 5% of your code. The fact that the percentage is higher in the latter case doesn't change the fact that 95% of your codebase is just as safe as the Python project would be.
Re:C Is Best by antirez on Tuesday January 06, 2026 @10:45AM (#46513749)
A big amount of C code does not do anything unsafe as well, it calls other stuff, do loops, logic business, and so forth. It is also wrong to believe 100% of the C code is basically unsafe.
Re:C Is Best by pdimitar on Tuesday January 06, 2026 @12:17PM (#46515224)
Who is saying that 100% of C code is unsafe? It's potentially unsafe, as in: the mainstream compilers are unable to prove the code is memory-safe.

Rust achieves a sizable but not complete victory on that front.

I can't find the extreme claims that you seem to argue against.

Re:C Is Best by kibwen on Tuesday January 06, 2026 @11:50AM (#46514766)
If so, then it should be trivial for someone to introduce something like Rust's `unsafe` keyword in C such that the unsafe operations can be explicitly annotated and encapsulated.

Of course, it's not actually this trivial because what you're saying is incorrect. C is not equipped to enforce memory safety; even mundane C code is thoroughly suffused with operations that threaten to spiral off the rails into undefined behavior.

Re:C Is Best by uecker on Tuesday January 06, 2026 @01:11PM (#46516133)
It is not so hard to introduce a "safe" keyword in C. I have a patched GCC that does it. The subset of the language which can be used safety is a bit too small to be full replacement on its own, but also not that small.
Re:C Is Best by amluto on Tuesday January 06, 2026 @11:58AM (#46514900)
C lacks safe primitives or non-error-prone ways to build abstractions to refer to business objects. There are no safe string references, let along ways to safely manipulate strings. Want to iterate over or index into a result set? You can try to remember to put bounds checks into every API function.

But even with explicit bounds checks, C has an ace up its sleeve.

    int cost_of_nth_item(int n) {
        if (n < 0 || n >= num_items)
            return -1;  // error handling
        …
    }
Safe, right? Not so fast, because if the caller has a code path that forgets to initialize the argument, it’s UB.
Re:C Is Best by staticassertion on Tuesday January 06, 2026 @10:55AM (#46513910)
You're swapping definitions of unsafe. Earlier you were referring to the `unsafe` keyword. Now you're using `unsafe` to refer to a property of code. This makes it easy to say things like "It is also wrong to believe 100% of the C code is basically unsafe" but you're just swapping definitions partway through the conversation.
Re:C Is Best by broken-kebab on Tuesday January 06, 2026 @11:36AM (#46514554)
What I see is that antirez claims that absence of "safe" (as syntax) in C lang doesn't automatically mean that all of C code is unsafe (as property). There's no swapping of definitions as I see it.
Re:C Is Best by b40d-48b2-979e on Tuesday January 06, 2026 @12:21PM (#46515311)
Except that's a dishonest interpretation especially for someone of antirez's experience.
Re:C Is Best by staticassertion on Tuesday January 06, 2026 @01:19PM (#46516266)
I think there's a very clear switch of usage happening. Maybe it's hard to see so I'll try to point out exactly where it happens and how you can spot it.

First from antirez:

> You don't need much unsafe if you use Rust to replace a Python project, for instance. If there is lower level code, high performances needs, things change.

Use of the term `unsafe` here referring to the keyword / "blocks" of code. Note that this statement would be nonsensical if talking about `unsafe` as a property of code, certainly it would be inconsistent with the later unsafe since later it's claimed that C code is not inherently "unsafe" (therefor Rust would not be inherently "unsafe").

Kibwen staying on that definition here:

> For replacing a Python project with Rust, unsafe blocks will comprise 0% of your code. For replacing a C project with Rust, unsafe blocks will comprise about 5% of your code.

Here is the switch:

> A big amount of C code does not do anything unsafe as well

Complete shift to "unsafe" as being a property of code, no longer talking about the keyword or about blocks of code. You can spot it by just rewriting the sentences to use Rust instead of C.

You can say:

"A big amount of 'unsafe' Rust code does not do anything unsafe as well" "It is also wrong to believe 100% of the unsafe Rust code is basically unsafe."

I think that makes this conflation of terms clear, because we're now talking about the properties of the code within an "unsafe" block or globally in C. Note how clear it is in these sentences that the term `unsafe` is being swapped, we can see this by referring to "rust in unsafe blocks" explicitly.

This is just a change of definitions partway through the conversation.

p.s. @Dang can you remove my rate limit? It's been years, I'm a good boy now :)

Re:C Is Best by marcosdumay on Tuesday January 06, 2026 @12:59PM (#46515924)
Almost all of C code does unsafe things. Deferencing a pointer is unsafe, using the address of a variable is unsafe, adding signed integers is unsafe.
Re:C Is Best by gf000 on Tuesday January 06, 2026 @03:24PM (#46518130)
High performance is not an on/off target. Safe rust really lets you express a lot of software patterns in a "zero-cost" way. Sure, there are a few patterns where you may need to touch unsafe, but safe rust itself is not slow by any means.
Re:C Is Best by j-krieger on Wednesday January 14, 2026 @07:24PM (#46626102)
There is a reason for this. A lot of libraries were written at a time when the Rust compiler either rejected sound and safe code so you have to reach for unsafe, or `core` didn't yet deliver safe abstractions.
Re:C Is Best by antirez on Tuesday January 06, 2026 @10:22AM (#46513394)
In Rust you can avoid "unsafe" when you use Rust like it was Go or Python. If you write low level code, that is where C is in theory replaceable only by Rust (and not by Go), then you find yourself in need of writing many unsafe sections. And to lower the amount of unsafe sections, you have to build unnatural abstractions, often, in order to group such unsafe sections into common patterns. Is is a tradeoff, not a silver bullet.
Re:C Is Best by burntsushi on Tuesday January 06, 2026 @10:48AM (#46513793)
Not necessarily at all. Go peruse the `regex` crate source code, including its dependencies.

The biggest `unsafe` sections are probably for SIMD accelerated search. There's no "unnatural abstractions" there. Just a memmem-like interface.

There's some `unsafe` for eliding bounds checks in the main DFA search loops. No unnatural abstractions there either.

There's also some `unsafe` for some synchronization primitives for managing mutable scratch space to use during a search. A C library (e.g., PCRE2) makes the caller handle this. The `regex` crate does it for you. But not for unnatural reasons. To make using regexes simpler. There are lower level APIs that provide the control of C if you need it.

That's pretty much it. All told, this is a teeny tiny fraction of the code in the `regex` crate (and all of its dependencies).

Finally, a demonstration of C-like speed: https://github.com/BurntSushi/rebar?tab=readme-ov-file#summa...

> Is is a tradeoff, not a silver bullet.

Uncontroversial.

Re:C Is Best by tasn on Tuesday January 06, 2026 @10:33AM (#46513561)
I think this framing is a bit backwards. Many C programs (and many parts of C programs) would benefit from being more like Go or Python as evident by your very own sds.c.

Now, if what you're saying is that with super highly optimized sections of a codebase, or extremely specific circumstances (some kernel drivers) you'd need a bit of unsafe rust: then sure. Though all of a sudden you flipped the script, and the unsafe becomes the exception, not the rule; and you can keep those pieces of code contained. Similarly to how C programmers use inline assembly in some scenarios.

Funny enough, this is similar to something that Rust did the opposite of C, and is much better for it: immutable by default (let mut vs. const in C) and non-nullable by default (and even being able to define something as non-null). Flipping the script so that GOOD is default and BAD is rare was a huge win.

I definitely don't think Rust is a silver bullet, though I'd definitely say it's at least a silver alloy bullet. At least when it comes to the above topics.

Re:C Is Best by josephg on Tuesday January 06, 2026 @01:18PM (#46516245)
In my experience (several years of writing high performance rust code), there’s only really 2 instances where you need unsafe blocks:

- C interop

- Low level machine code (eg inline assembly)

Most programs don’t need to do either of those things. I think you could directly port redis to entirely safe rust, and it would be just as fast. (Though there will need be unsafe code somewhere to wrap epoll).

And even when you need a bit of unsafe, it’s usually a tiny minority of any given program.

I used to think you needed unsafe for custom container types, but now I write custom container types in purely safe rust on top of Vec. The code is simpler, and easier to debug. And I’m shocked to find performance has mostly improved as a result.

Re:C Is Best by nec4b on Tuesday January 06, 2026 @12:38PM (#46515572)
>> I guess that's at least in part because of the difficulty of building safe, fast and highly-concurrent C applications (please correct me if I'm wrong).

You wrote that question in a browser mostly written in C++ language, running on an OS most likely written in C language.

Re:C Is Best by gf000 on Tuesday January 06, 2026 @03:33PM (#46518258)
Just because the pyramids exist, it means they were easy to build?

OS and browser development are seriously hard and took countless expert man hours.

Re:C Is Best by nec4b on Tuesday January 06, 2026 @05:58PM (#46520052)
OS can be actually pretty simple to make. Sometimes it's a part of a CS curriculum to make one. If it were so much easier to do it in other languages (e.g. in Rust), don't you think we would already be using them?
Re:C Is Best by gf000 on Tuesday January 06, 2026 @06:21PM (#46520296)
https://github.com/flosse/rust-os-comparison

Writing a toy one? Sure.

Writing a real one? Who's gonna write all the drivers and the myriad other things?

And the claim was not that it's "so much easier", but that it is so much easier to write it in a secure way. Which claim is true. But it's still a complex and hard program.

(And don't even get started on browsers, it's no accident that even Microsoft dropped maintaining their own browser).

Re:C Is Best by nec4b on Tuesday January 06, 2026 @07:11PM (#46520793)
The toy one can still be as highly concurrent as the the real one. The amount of drivers written for it doesn't matter.

The point is if it were much easier, then they would overtake existing ones easily, just by adding features and iterating so much faster and that is clearly not the case.

>>difficulty of building safe, fast and highly-concurrent C

This was the original claim. The answer is, there is a tonne of C code out there that is safe, fast and concurrent. Isn't it logical? We have been using C for the last 50 years to build stuff with it and there is a lot of it. There doesn't seem to be a big jump in productivity with the newer generation of low level languages, even though they have many improvements over C.

This is anecdotal, I used to do a lot of low level C and C++ development. And C++ is a much bigger language then C. And honestly I don't think I was ever more productive with it. Maybe the code looked more organized and extendable, but it took the same or larger amount of time to write it. On the other hand when I develop with Javascript or C#, I'm easily 10 times more productive then I would be with either C or C++. This is a bit of apples and oranges comparison, but what I'm trying to say is that new low level languages don't bring huge gains in productivity.

Re:C Is Best by burntsushi on Tuesday January 06, 2026 @10:50AM (#46513832)
> With C you may, if you wish, develop a big sensibility to race conditions, and stay alert. In general it is possible that C programmers have their "bugs antenna" a bit more developed than other folks.

I suppose it's possible. I wonder if I'll become a better driver if I take off my seatbelt. Or even better, if I take my son out of my car seat and just let him roam free in the back seat. I'm sure my wife will buy this.

In all seriousness, your comment reminds me of this funny video: https://www.youtube.com/watch?v=glmcMeTVIIQ

It's nowhere near a perfect analogy, but there are some striking similarities.

Re:C Is Best by lock1 on Tuesday January 06, 2026 @11:22AM (#46514353)
FWIW, FAFO is a very good way to learn. Assuming we can respawn indefinitely and preserve knowledge between respawns, driving fast and taking off your seatbelt would definitely teach you more than just reading a book.

But in this specific case, if the respawn feature is not available or dying isn't a desirable event, FAFO might not be the best way to learn how to drive.

Re:C Is Best by josephg on Tuesday January 06, 2026 @01:22PM (#46516311)
I also think we have the data in for memory safety in C. Even the best people, with the best processes in the world seem to keep writing memory safety bugs. The “just be more vigilant” plan doesn’t seem to work.
Re:C Is Best by staticassertion on Tuesday January 06, 2026 @01:24PM (#46516353)
> FWIW, FAFO is a very good way to learn. Assuming we can respawn indefinitely and preserve knowledge between respawns, driving fast and taking off your seatbelt would definitely teach you more than just reading a book.

Yes, just sucks for the person who you hit with your car, or the person whose laptop gets owned because of your code.

"FAFO" is not a great method of learning when the cost is externalized.

Re:C Is Best by jamincan on Tuesday January 06, 2026 @12:56PM (#46515894)
Human behaviour can be a confounding thing. There was some debate a while ago [1] about whether bike helmet use may actually lead more head injuries due to factors like drivers passing closer to helmeted riders vs. unhelmeted ones or riders riding more recklessly, among a tonne of other factors. I still prefer to wear a helmet, but its an interesting example of how difficult it can be to engineer human behaviour.

Another good example of this is how civil engineers adding safety factors into design of roads - lane widths, straighter curves, and so on - leading drivers to speed more and decreasing road safety overall.

1. https://bigthink.com/articles/the-bike-helmet-paradox/

Re:C Is Best by erk__ on Tuesday January 06, 2026 @10:23AM (#46513411)
A quick unscientific count on cve.org counts ~86 race condition CVEs in the Linux kernel last year, so you might be overstating how well bug antennas work.
Re:C Is Best by antirez on Tuesday January 06, 2026 @10:24AM (#46513428)
If the kernel was completely written in Rust, we could have a lot of unsafe places, and many Rust CVEs. It is hard to tell, and the comparison in theory should be made after the kernel is developed only by people lacking the C experience that made the current developers so able to reason about race conditions (also when they write Rust).
Re:C Is Best by Certhas on Tuesday January 06, 2026 @11:07AM (#46514132)
That's quite the double standard. You extrapolate from one single Rust bug, but insist that "it's hard to tell" and you need completely unrealistic levels of empirical evidence to draw conclusions from the reported C bugs...

Reminds me of this classic: "Beware Isolated Demands For Rigor" (https://slatestarcodex.com/2014/08/14/beware-isolated-demand...)

Re:C Is Best by atherton94027 on Tuesday January 06, 2026 @10:37AM (#46513623)
86 race conditions compared to what baseline? This is a bit meaningless without benchmarking against other kernels
Re:C Is Best by staticassertion on Tuesday January 06, 2026 @10:53AM (#46513877)
It's 1 compared to 86, 86 is the baseline.
Re:C Is Best by atherton94027 on Tuesday January 06, 2026 @11:03AM (#46514079)
But you need to control for lines of code at the very least — otherwise you're comparing apples to oranges
Re:C Is Best by erk__ on Tuesday January 06, 2026 @01:09PM (#46516100)
Then it would not be unscientific.
Re:C Is Best by atherton94027 on Tuesday January 06, 2026 @01:23PM (#46516330)
Yeah I mean I could also say "there are no CVEs written in PERL in the kernel ergo PERL is safer to write than Rust". Given there's close to zero .pl files in the kernel, I think we can all agree my assertion holds
Re:C Is Best by jason_oster on Tuesday January 06, 2026 @07:16PM (#46520836)
That claim relies on an absurd "in the kernel" qualifier, making it difficult to agree with. Furthermore, your hypothesis is that "we all" agree with claims that rely on absurd conditions as a matter of course.
Re:C Is Best by staticassertion on Tuesday January 06, 2026 @02:09PM (#46517018)
I'm perfectly happy to say that it's not a very good way to make a comparison.
Re:C Is Best by f1shy on Tuesday January 06, 2026 @11:51AM (#46514779)
That is no base line. That is a comparison with no statistical value.
Re:C Is Best by erk__ on Tuesday January 06, 2026 @02:28PM (#46517308)
Tbh I thought that was clear when I used the phrase "unscientific".
Re:C Is Best by alexpadula on Tuesday January 06, 2026 @10:57AM (#46513955)
Love it
Re:C Is Best by staticassertion on Tuesday January 06, 2026 @10:24AM (#46513420)
(2) and (3) just don't seem to be the case empirically. One bug that was directly in a grep'able `unsafe` block is hardly evidence of these, whereas Google's study on Rust has demonstrated (far more rigorously imo) the opposite. I think anyone paying attention would have guessed that the first Rust CVE would be a race - it is notoriously hard to get locking/ race semantics correct in the kernel, not even the C programmers get it right, it's an extremely common bug class and I believe Linus has basically said something along the lines of "no one understands it" (paraphrasing).

(4) Again, this doesn't seem to be borne out empirically.

(5) I've seen plenty of patches to C code that are way more than a single line for the Linux kernel, but sure, maybe we grant that a bug fix in Rust requires more LOC changed? It'd be nice to see evidence. Is the concern here that this will delay patching? That seems unlikely.

It's not uncommon at all for patches to the C code in the kernel for "make this generally safe" are 1000s of lines of code, seeding things like a "length" value through code, and take years to complete. I don't think it's fair to compare these sorts of "make the abstraction safe" vs "add a single line check" fixes.

(6) Also not borne out. Literally billions spent on this.

> So, is Rust an interesting language for certain features it has? Yes. Is Rust a silver bullet? No.

Agreed. I'm tempted to say that virtually no one contests the latter lol

> So should Rust be "pushed" to others, hell no, and I suggest you to reply in the most firm way to people stressing you out to adopt Rust at all the costs.

I guess? You can write whatever you want however you want, but users who are convinced that Rust code will provide a better product will ask for it, and you can provide your reasoning (as SQLite does here, very well imo) as firm as you'd please I think.

edit: And to this other comment (I'm rate limited): https://news.ycombinator.com/item?id=46513428

> made the current developers so able to reason about race conditions (also when they write Rust).

Aha. What? Where'd you get this from? Definitely not from Linus, who has repeatedly stated that lock issues are extremely hard to detect ahead of time.

> we’ve tweaked all the in-kernel locking over decades [..] and even people who know what they are doing tend to get it wrong several times

https://lwn.net/Articles/808498/

Definitely one of MANY quotes and Linus is not alone.

Re:C Is Best by blub on Tuesday January 06, 2026 @10:45AM (#46513735)
Google have published a couple high-level Rust blog posts with many graphs and claims, but no raw data or proofs, so they haven’t demonstrated anything.

By now their claims keep popping up in Rust discussion threads without any critical evaluation, so this whole communication is better understood as a marketing effort and not a technical analysis.

Re:C Is Best by staticassertion on Tuesday January 06, 2026 @10:48AM (#46513798)
> Google have published a couple high-level Rust blog posts with many graphs and claims, but no raw data or proofs, so they haven’t demonstrated anything.

Don't expect proofs from empirical data. What we have is evidence. Google has published far better evidence, in my view, than "we have this one CVE, here are a bunch of extrapolations".

> By now their claims keep popping up in Rust discussion threads without any critical evaluation,

Irrelevant to me unless you're claiming that I haven't critically evaluated the information for some reason.

Re:C Is Best by alfiedotwtf on Tuesday January 06, 2026 @01:04PM (#46516010)
> In general it is possible that C programmers have their "bugs antenna" a bit more developed than other folks.

If that were truely the case, we wouldn’t need Rust now, would we!

Re:C Is Best by oconnor663 on Tuesday January 06, 2026 @01:34PM (#46516489)
> With C you may, if you wish, develop a big sensibility to race conditions, and stay alert. In general it is possible that C programmers have their "bugs antenna" a bit more developed than other folks.

I think there are effects in both directions here. In C you get burned, and the pain is memorable. In Rust you get forced into safe patterns immediately. I could believe that someone who has done only Rust might be missing that "healthy paranoia". But for teaching in general, it's hard to beat frequent and immediate feedback. Anecdotally it's common for experienced C programmers to learn about some of the rules only late in their careers, maybe because they didn't happen to get burned by a particular rule earlier.

> Rust may create a false sense of security, and in the unsafe sections the programmer sometimes, when reviewing the code, is falsely convinced by the mandatory SAFETY comment.

This is an interesting contrast to the previous case. If you write a lot of unsafe Rust, you will eventually get burned. If you're lucky, it'll be a Miri failure. I think this makes folks who work with unsafe Rust extremely paranoid. It's also easier to sustain an that level of paranoia with Rust, because you hopefully only have to consider small bits of unsafe code in isolation, and not thousands of lines of application logic manipulating raw pointers or whatever.

Re:C Is Best by accelbred on Tuesday January 06, 2026 @02:58PM (#46517749)
The amount of paranoia I need for unsafe Rust is orders of magnitudes higher than C. Keeping track of the many things that can implicity drop values and/or free memory, and figuring out if im handling raw pointers and reference conversions in a way that doesn't accidentally alias is painful. The C rules are fewer and simpler, and are also well known, and are aleviated and documented by guidelines like MISRA. Unsafe Rust has more rules, which seem underspecified and underdocumented, and also unstable. Known unknowns are preferable over unknown unknowns.
Re:C Is Best by threethirtytwo on Tuesday January 06, 2026 @11:38AM (#46514586)
Is there still pressure to use OOP? On Hacker News, at least, the trend seems to be moving in the opposite direction. There’s growing skepticism toward OOP, and that’s reflected in the popularity of languages like Rust and Zig, which are explicitly designed to push against traditional object-oriented patterns.

That’s not to say OOP advocacy has disappeared from HN. It still exists, but it no longer feels dominant or ascendant. If anything, it feels like a legacy viewpoint maintained by a sizable but aging contingent rather than a direction the community is moving toward.

Part of OOP’s staying power comes from what I’d call a cathartic trap. Procedural programming is intuitive and straightforward. OOP, by contrast, offers a new conceptual lens: objects, inheritance, polymorphism, and eventually design patterns. When someone internalizes this framework, there’s often a strong moment of “clicking” where complex software suddenly feels explainable and structured. That feeling of insight can be intoxicating. Design patterns, in particular, amplify this effect by making complexity feel principled and universally applicable.

But this catharsis is easy to confuse with effectiveness. The emotional satisfaction of understanding a system is orthogonal to whether that system actually produces better outcomes. I’ve seen a similar dynamic in religion, where the Bible’s dense symbolism and internal coherence produce a powerful sense of revelation once everything seems to “fit” together. The feeling is real, but it doesn’t validate the underlying model.

In practice, OOP often increases complexity and reduces modularity. This isn’t always obvious from inside the paradigm. It tends to become clear only after working seriously in other paradigms, where composition, data-oriented design, or functional approaches make the tradeoffs impossible to ignore.

Re:C Is Best by f1shy on Tuesday January 06, 2026 @11:45AM (#46514681)
In my circles, there is one part of OOP seen as positive: encapsulation. Everything else, specially inheritance and partly polymorphism are seen extremely negatively. The hype is over. BUT: I still hear more often as I would like, some manager stating “of course we will use C++, because is THE OOP language, and everybody knows OOP and UML are the only right way of doing software” this is an actual verbatim statement I had to listen 4 years ago.
Re:C Is Best by threethirtytwo on Tuesday January 06, 2026 @12:07PM (#46515036)
I mostly agree with your assessment of how OOP is viewed today. In many technical circles, inheritance is seen as actively harmful, and polymorphism is at best tolerated and often misunderstood. The hype is largely gone. I’ve also heard the same managerial rhetoric you mention, where OOP and UML are treated as unquestionable defaults rather than design choices, so that part unfortunately still resonates.

Where I disagree is on encapsulation being the “good” part of OOP.

Encapsulation, as a general idea, is positive. Controlling boundaries, hiding representation, and enforcing invariants are all valuable. But encapsulation as realized through objects is where the deeper problem lies. Objects themselves are not modular, and the act of encapsulating a concept into an object breaks modularity at the moment the boundary is drawn.

When you encapsulate something in OOP, you permanently bind state and the methods that mutate that state into a single unit. That decision fixes the system’s decomposition early and hardens it. Behavior can no longer move independently of data. Any method that mutates state is forever tied to that object, its invariants, and its lifecycle. Reuse and recomposition now operate at the object level rather than the behavior level, which is a much coarser and more rigid unit of change.

This is the core issue. Encapsulation in OOP doesn’t just hide implementation details; it collapses multiple axes of change into one. Data representation, behavior, and control flow are fused together. As requirements evolve, those axes almost never evolve in lockstep, but the object boundary forces them to.

What makes this especially insidious is that the failure mode is slow and subtle. OOP systems don’t usually fail immediately. They degrade over time. As new requirements arrive, developers feel increasing resistance when trying to adapt the existing design. Changes start cutting across object boundaries. Workarounds appear. Indirection layers accumulate. Eventually the system is labeled as having “too much tech debt” or being the result of “poor early design decisions.”

But this framing misses the point. The design mistakes were not merely human error; they were largely inevitable given the abstraction. The original object model could not have anticipated future requirements, and because it was not modular enough to allow the design itself to evolve, every change compounded rigidity. The problem wasn’t that the design was wrong. It’s that it was forced to be fixed.

Polymorphism doesn’t fundamentally resolve this, and often reinforces it. While polymorphism itself is not inherently object-oriented, in OOP it is typically expressed through stateful objects and virtual dispatch. That keeps behavior anchored to object identity and mutation rather than allowing it to be recomposed freely as requirements shift.

The deeper requirement is that a system must be modular enough not just to extend behavior, but to change its own design as understanding improves. Object-based encapsulation works directly against this. It locks in assumptions early and makes architectural change progressively more expensive. By the time the limitations are obvious, the system is already entangled.

So while I agree that inheritance deserves much of the criticism, I think encapsulation via objects is the more fundamental problem. It’s not that encapsulation is bad in principle. It’s that object-based encapsulation produces systems that appear well-structured early on, but inevitably accumulate rigidity and hidden coupling over time. What people often call “tech debt” in OOP systems is frequently just the unavoidable artifact of an abstraction that was never modular enough to begin with. OOP was the tech debt.

The way forward is actually simple. Avoid mutation as much as possible. Use static methods (aka functions) as much as possible. Segregate IO and mutation into its own module separate from all other logic. Those rules are less of a cathartic paradigm shift then OOP and it takes another leap to see why doing these actually resolves most of the issues with OOP.

Re:C Is Best by f1shy on Tuesday January 06, 2026 @12:22PM (#46515334)
> Where I disagree is on encapsulation being the “good” part of OOP. Encapsulation, as a general idea, is positive. Controlling boundaries, hiding representation, and enforcing invariants are all valuable. But encapsulation as realized through objects is where the deeper problem lies. Objects themselves are not modular, and the act of encapsulating a concept into an object breaks modularity at the moment the boundary is drawn.

I’m personally with you here. Just in my circle they see it positively. But I agree with you: as long as it helps modularity, great, but also have many downsides that you describe very well.

Your last paragraph also perfectly aligned with my views. I think you are coming from a functional PoV, which luckily seems to have some more traction in the last decade or two. Sadly, before you say it, often are underline the parts of functional programming that are not the most useful you address here… but maybe, some day…

Re:C Is Best by goku12 on Tuesday January 06, 2026 @01:15PM (#46516193)
> There’s growing skepticism toward OOP, and that’s reflected in the popularity of languages like Rust and Zig, which are explicitly designed to push against traditional object-oriented patterns.

I don't know about Zig, but my experience with Rust's trait system is that it isn't explicitly against OOP. Traits and generics feel like an extension and generalization of the OOP principles. With OOP, you have classes (types) and/or objects (instances) and bunch of methods specific to the class/object. In Rust, you extend that concept to almost all types including structs and enums.

> OOP, by contrast, offers a new conceptual lens: objects, inheritance, polymorphism, and eventually design patterns.

Rust doesn't have inheritance in the traditional sense, but most OOP languages prefer composition to data inheritance. Meanwhile, polymorphism, dynamic dispatch and design patterns all exist in Rust.

Re:C Is Best by threethirtytwo on Tuesday January 06, 2026 @01:21PM (#46516299)
> I don't know about Zig, but my experience with Rust's trait system is that it isn't explicitly against OOP. Traits and generics feel like an extension and generalization of the OOP principles. With OOP, you have classes (types) and/or objects (instances) and bunch of methods specific to the class/object. In Rust, you extend that concept to almost all types including structs and enums.

That’s not oop. Traits and generics are orthogonal to oop. It’s because oop is likely where you learned these concepts so you think the inception of these things is derived from oop.

What’s unique to oop is inheritance and encapsulation.

Design patterns isn’t unique to OOP either but there’s a strong cultural association with it. The term often involves strictly using encapsulated objects as the fundamental building block for each “pattern”.

The origin of the term “design patterns” was in fact established in context of OOP through the famous book and is often used exclusively to refer to OOP but the definition of the term itself is more broad.

Re:C Is Best by kristoff_it on Tuesday January 06, 2026 @12:10PM (#46515087)
> Every project and programmer shouldn't feel they have to justify their choice not to use Rust (or Zig)

You won't find easily Zig programmers that want you to use Zig at all costs, or that believe it's a moral imperative that you do. It's just antithetical to the whole concept of Zig.

The worst that can happen is that Zig programmers want C projects to have a build.zig so they can cross-compile the project trivially, since that's usually not a thing C/C++ build scripts tend to offer. And even then, we have https://github.com/allyourcodebase/ so that Zig users can get their build.zig scripts without annoying project maintainers.

Re:C Is Best by pie_flavor on Tuesday January 06, 2026 @08:56AM (#46512279)
It should not be strange that a tool which is better in every way and makes your code less buggy by default has its praises sung by most of the people who use it. It would be odd to go around saying 'electric drills are strangely and disproportionately pushed at Home Depot over the good old hand auger', and even if I don't work at your contracting company I'd be slightly unnerved about you working on my house.
Re:C Is Best by agentultra on Tuesday January 06, 2026 @09:21AM (#46512579)
I’ve heard this analogy used to justify firing developers for not using GenAI: a cabinet maker who doesn’t use power tools shouldn’t be working as a cabinet maker.

If only programming languages (or GenAI) were tools like hammers and augers and drills.

Even then the cabinets you see that come out of shops that only use hand tools are some of the most sturdy, beautiful, and long lasting pieces that become the antiques. They use fewer cuts, less glue, avoid using nails and screws where a proper joint will do, etc.

Re:C Is Best by pie_flavor on Tuesday January 06, 2026 @10:38AM (#46513633)
Less glue and avoidance of nails and screws doesn't make it sturdier. Fastening things strongly makes your furniture sturdier than not doing so. Antiques suck as often as they don't, and moreover you are only seeing the ones that survived without a base rate to compare it to; they succeeded in spite of power tools, but power tools would have made the same object better.

Comparing it to AI makes no sense. Invoking it is supposed to bring to mind the fact that it's worse in well-known ways, but then the statement 'better in every way' no longer applies. Using Rust passively improves the engineering quality compared to using anything else, unlike AI which sacrifices engineering quality for iteration speed.

Re:C Is Best by quesera on Tuesday January 06, 2026 @11:20AM (#46514322)
> Less glue and avoidance of nails and screws doesn't make it sturdier. Fastening things strongly makes your furniture sturdier than not doing so.

No disrespect intended, but your criticism of the analogy reveals that you are speaking from assumptions, but not knowledge, about furniture construction.

In fact, less glue, and fewer fasteners (i.e. design that leverages the strength of the materials), is exactly how quality furniture is made more sturdy.

Re:C Is Best by blub on Tuesday January 06, 2026 @01:39PM (#46516562)
There was an interesting video on YT where an engineer from a fastener company joined a carpenter to compare their products with traditional joints.

The traditional joints held up very well and even beat the engineered connectors in some cases. Additionally one must be careful with screws and fasteners: if they’re not used according to spec, they may be significantly weaker than expected. The presented screws had to be driven in diagonally from multiple positions to reach the specified strength; driving them straight in, as the average DIYer would, would have resulted in a weak joint.

Glue is typically used in traditional joinery, so less glue would actually have a negative effect.

Re:C Is Best by bsder on Tuesday January 06, 2026 @06:54PM (#46520643)
> Glue is typically used in traditional joinery, so less glue would actually have a negative effect.

And a lot of traditional joinery is about keeping the carcase sufficiently together even after the hide glue completely breaks down so that it can be repaired.

Modern glues allow you to use a lot less complicated joinery.

Re:C Is Best by layer8 on Tuesday January 06, 2026 @10:34AM (#46513574)
The thing is that more than a few people disagree that it is better in every way.
Re:C Is Best by waffletower on Tuesday January 06, 2026 @11:39AM (#46514599)
The topic seems to be native programming languages -- I don't think any of the languages concerned are "better in every way" for every possible coding problem. Many will rightfully choose Fortran over Rust for their application -- knowing full well their choice is far away from "better in every way".
Re:C Is Best by pklausler on Tuesday January 06, 2026 @12:14PM (#46515173)
When writing code meant to last, you need a language that’s portable across compilers and through time. C has demonstrated both. Fortran 77 and 90 were portable across compilers, but are now at risk from breaking changes, and later versions are not very portable across compilers.
Re:C Is Best by andrepd on Tuesday January 06, 2026 @09:40AM (#46512827)
I'm very much into Rust but this article is precisely about the fact that Rust is not "better in every way"...
Re:C Is Best by kibwen on Tuesday January 06, 2026 @10:35AM (#46513583)
This article was written nine years ago, when Rust 1.0 was two years old, by an author who spent a small (but nonzero) amount of time evaluating Rust.
Re:C Is Best by sigzero on Tuesday January 06, 2026 @11:15AM (#46514257)
This page was last updated on 2025-05-09 15:56:17Z
Re:C Is Best by kibwen on Tuesday January 06, 2026 @11:57AM (#46514881)
Given the author's misunderstanding of what Rust provides, the most charitable interpretation is that they haven't updated the parts discussing Rust since 2017. If they had, it would reflect more poorly on them.
Re:C Is Best by alexpadula on Tuesday January 06, 2026 @11:29AM (#46514461)
Not true, the page is updated every now and again.
Re:C Is Best by RustSupremacist on Wednesday January 07, 2026 @12:15AM (#46522869)
The most charitable interpretation of this is that the Reddit mods should stick to Reddit. If they had, this wouldn't have reflected so poorly on them.
Re:C Is Best by hu3 on Tuesday January 06, 2026 @09:31AM (#46512711)
Bad analogy.

If the alternative has drawbacks (they always do) or is not as well known by the team, it's perfecly fine to keep using the tool you know if it is working for you.

People who incessantly try to evangelise their tool/belief/preferences to others are often seen as unpleasant to say the least and they often achieve the opposite effect of what they seek.

Re:C Is Best by anthonypasq on Tuesday January 06, 2026 @10:12AM (#46513258)
of course there are drawbacks to power tools. you could run out of battery for example and now its useless.

but everyone with a brain knows the costs are worth the benefits.

Re:C Is Best by hu3 on Tuesday January 06, 2026 @10:22AM (#46513386)
I was talking in general if that escaped you. Hence "beliefs/preferences" and not only tools.

And when it comes to programming languages, it's not as clear cut. As exemplified by the article.

So the power tools is a poor analogy.

Re:C Is Best by ActorNightly on Wednesday January 07, 2026 @01:24PM (#46530338)
The issue is that Rust proponents automatically assume that if you write enough C code, there will be memory related bugs.

In reality, this is not the case. Bad code is the result of bad developers. Id rather have someone writing C code that understands how memory bugs happen rather than a Rust developer thinking that the compiler is going to take care of everything for them.

Re:C Is Best by baq on Tuesday January 06, 2026 @09:36AM (#46512783)
I mostly agree, but the OOP is most definitely not in vogue on HN for the past decade at least, arguably far longer than that (think Rust pre-1.0, Go 1.0 times).
Re:C Is Best by Supernaut on Tuesday January 06, 2026 @10:04AM (#46513152)
Absolutely. Our thought leaders have been pushing functional programming for a long time now.
Re:C Is Best by ruszki on Tuesday January 06, 2026 @10:28AM (#46513471)
Is it possible to have an OOP language which is also functional? Or is it impossible without imperative paradigms?
Re:C Is Best by bigfishrunning on Tuesday January 06, 2026 @10:45AM (#46513750)
There's some muddiness in the terminology here -- OOP is really a design style, and "OOP languages" are generally imperative languages that have sematics that encourage OOP design. It is very possible, even encouraged, to represent state as "Objects" in many functional languages; it's just not really enforced by the language itself.

A good example of this are the object systems in Scheme and Common Lisp (which are less strictly Functional (note the capital F in that word) then something like Haskell).

Re:C Is Best by ruszki on Tuesday January 06, 2026 @12:37PM (#46515547)
I asked mainly because of the terminology. I read the primer of how to code OOP in plain C about a decade ago, so I knew that the paradigm definitely can be applied to “non OOP languages”, but I wasn’t sure whether the term “functional programming” allows this or not for some obscure academic reasons. How I coded when I encountered Haskell the first time, I would say it’s definitely possible, but I think, there are some features in Haskell which can be used to break pure functional programming, and if those are not considered FP, then who knows. But I used Haskell the last time a few years ago, so my memory is definitely not clear.
Re:C Is Best by rpcope1 on Tuesday January 06, 2026 @01:01PM (#46515962)
I mean Scala kind of does both (and then some). I'm not sure I would call it an OOP language, but you can sure write the same gross Java enterprise bloatware in Scala too if you want.
Re:C Is Best by gf000 on Tuesday January 06, 2026 @03:45PM (#46518430)
Scala has been that for decades. They are not opposing paradigms. (In fact, mutability has a few edge cases that doesn't play nicely with OOP to begin with)
Re:C Is Best by smj-edison on Tuesday January 06, 2026 @07:27PM (#46520906)
Gilad Bracha talks about how they're not mutually exclusive concepts, and I mostly agree (OOP can have tailcall recursion and first order functions for example). But, the philosophy seems very different: functional programming is "standing above" the data, where you have visibility at all times, and do transformations on the data. OOP is much more about encapsulation, where you "send a message" to an object, and it does its own thing. So you could totally write OOP code where you provide some core data structures that you run operations on, but in practice encapsulation encourages hiding internal data.

Though on further thought, may be this isn't FP vs OOP, because C has a similar approach of "standing above", and C is the hallmark imperative language.

Re:C Is Best by spopejoy on Wednesday January 07, 2026 @04:35PM (#46533258)
Smalltalk, the original OOP lang, is "both", at least if you're not one of those people who thinks FP c'est impossible if it's not ML or haskell
Re:C Is Best by runjake on Tuesday January 06, 2026 @09:48AM (#46512925)
Context: Along with the never ending pressure to migrate a project to new shiny, there is a lot of momentum against C and other memory-unsafe languages.

The US government recently called on everyone to stop using them and move to memory-safe languages.

Regardless, there are practices and tools that significantly help produce safe C code and I feel like more effort should be spent teaching C programmers those.

Edit: Typos and to make the point that I'm not necessarily defending C, just acknowledging it's place. I haven't written a significant amount of C in over 2 decades, probably, aside from microcontroller C.

Re:C Is Best by titzer on Tuesday January 06, 2026 @09:55AM (#46513033)
C was my first language, more than thirty years ago. I've heard (and probably myself made) the same arguments over and over and over. But those arguments are lame and wrong.

C cannot be made safe (at scale). It's like asbestos. In fact, C is a hazardous material in exactly the same way as asbestos. Naturally occurring, but over industrialized and deployed far too widely before its dangers were known. Still has its uses but it will fuck you up if you do not use industrial-grade PPE.

Stop using C if you can. Stop arguing other people should use it. There have always been alternatives and the opportunity cost of ecosystems continuing to invest in C has massive externalized costs for the entire industry and society as a whole.

Re:C Is Best by Koshkin on Tuesday January 06, 2026 @10:13AM (#46513280)
> in exactly the same way

C is not known to the state of California to cause cancer.

Re:C Is Best by rascul on Tuesday January 06, 2026 @10:43AM (#46513707)
Not yet
Re:C Is Best by toxik on Tuesday January 06, 2026 @10:12AM (#46513261)
Asbestos causes mesothelioma and gruesome death. C does not. Be serious.
Re:C Is Best by em3rgent0rdr on Tuesday January 06, 2026 @10:59AM (#46513981)
When C code is run in machines capable of failing with gruesome death, its unsafeness may indeed result in gruesome death.
Re:C Is Best by lelanthran on Tuesday January 06, 2026 @11:10AM (#46514163)
> When C code is run in machines capable of failing with gruesome death, its unsafeness may indeed result in gruesome death.

And yet, it never does. It's been powering those types of machines likely longer than you have been alive, and the one exception I can think of where lives were lost, the experts found that the development process was at fault, not the language.

If it was as bad as you make out, we'd have many many many occurrences of this starting in the 80s. We don't.

Re:C Is Best by wewtyflakes on Tuesday January 06, 2026 @02:29PM (#46517330)
Re:C Is Best by torstenvl on Thursday January 08, 2026 @11:27AM (#46542927)
Please don't post flamebait or FUD here. The Therac-25 was not programmed in C.
Re:C Is Best by wewtyflakes on Thursday January 08, 2026 @05:12PM (#46547228)
How was this flamebait? It is an example of how bad programming choices/assumptions/guardrails costs lives, a counterargument to the statement of 'And yet, it never does'. Splitting hairs if the language is C or assembly is missing the spirit of the argument, as both those languages share the linguistic footguns that made this horrible situation happen (but hey, it _was_ the 80s and choices of languages was limited!). Though, even allowing the "well ackuacally" cop-out argument, it is trivial to find examples of code in C causing failures due to out-of-bounds usage of memory; these bugs are found constantly (and reported here, on HN!). Now, you would need to argue, "well _none_ of those programs are used in life-saving tech" or "well _none_ of those failures would, could, or did cause injury", to which I call shenanigans. The link drop was meant to do just that.
Re:C Is Best by torstenvl on Tuesday January 13, 2026 @07:47PM (#46610837)
The claim was "And yet, it [C] never does ['result in gruesome death']."
Re:C Is Best by wewtyflakes on Thursday January 15, 2026 @11:47AM (#46635318)
How many asterisks do you need in order to be technically correct while also missing the point?
Re:C Is Best by torstenvl on Tuesday January 20, 2026 @11:52AM (#46694187)
The point is simple. Don't make false claims and don't post flame bait.
Re:C Is Best by wewtyflakes on Thursday January 22, 2026 @05:06PM (#46725735)
We need to agree to disagree on this one; the claim that C is fine and does not cause harm due to its multitude of foot-guns, I think, is an egregious and false claim. So don't make false claims and don't post toxic positivity, I guess?
Re:C Is Best by torstenvl on Sunday January 25, 2026 @09:12PM (#46761034)
No. We don't need to agree on anything. You. Are. Wrong. And you knew you were wrong when you posted it.

Therac-25 was, as a matter of inarguable and objective historical fact, not programmed in C. Period.

Your continued insistence on this topic even after correction demonstrates clearly that your dishonesty is quite intentional. Shame on you.

Re:C Is Best by wewtyflakes on Monday January 26, 2026 @01:30PM (#46769575)
You. Missed. The. Point. Shame on you!
Re:C Is Best by coliveira on Tuesday January 06, 2026 @10:00AM (#46513088)
Stop spreading FUD.
Re:C Is Best by torstenvl on Thursday January 08, 2026 @11:09AM (#46542652)
HN is not for flamebait.
Re:C Is Best by baranul on Tuesday January 06, 2026 @10:57AM (#46513953)
But oddly enough, Zig is not a memory-safe language, and yet still heavily pushed on here. There are a number of measures, comparatively, that can be taken to make C safer too. The story on what can be done with C is still evolving, as Fil-C and other related projects shows.

For that matter, there are a number of compiled memory-safe and safer languages: Dlang, Vlang, Golang, etc... who could be discussed and are equally viable choices. And if we are talking about something that needs to be outright safety-critical, Ada and SPARK should definitely be in the debate.

However, all of that doesn't override the right of projects to decide on what language they believe is best for them or what strategies concerning safety that they wish to pursue.

Re:C Is Best by riku_iki on Tuesday January 06, 2026 @02:15PM (#46517095)
> Golang, etc... who could be discussed and are equally viable choices.

Golang is not 100% zero cost close to metal abstraction. You could add Java and .NET too, but they are not replacement for C obviously.

Re:C Is Best by gf000 on Tuesday January 06, 2026 @03:42PM (#46518383)
Pushed != interested in/talked about. People really like to mash together a bunch of random individuals into a single actor/agenda.

Golang is not playing in the same niche as C/C++/Rust/Zig, but we have had countless memory safe languages that are indeed a good fit for many uses where C was previously used.

Re:C Is Best by pjmlp on Wednesday January 07, 2026 @10:49AM (#46527761)
Depends on the point of view, for Reversec, it does.

https://reversec.com/usb-armory

> In addition to native support for standard operating environments, such as Linux distributions, the USB armory is directly supported by TamaGo, an Reversec Foundry developed framework that provides execution of unencumbered Go applications on bare metal ARM® System-on-Chip (SoC) processors.

Re:C Is Best by samiv on Tuesday January 06, 2026 @10:37AM (#46513613)
Now imagine if every CVE was actually fixed.

How would the three letter agencies then spy on people and deliver their payloads on various target devices?

The governments around the world really need the security holes to exist despite what they say.

Re:C Is Best by irishcoffee on Tuesday January 06, 2026 @09:55AM (#46513034)
> The US government recently called on everyone to stop using them and move to memory-safe languages.

The US government also _really_ (no sarcasm) cares about safety-critical code that can be formally verified, depending on program requirements. DO-178, LOR1, el. al.

Developing those toolchains costs tens of millions, getting them certified costs tens of millions, and then buying those products to use costs 500k-1.5m a pop.

Those toolchains do not exist for rust. I am only aware of these toolchains existing for C, and old C at that.

Hell, rust doesn't even have a formal spec, which is a bit of a roadblock.

Re:C Is Best by monocasa on Tuesday January 06, 2026 @10:00AM (#46513096)
Re:C Is Best by irishcoffee on Tuesday January 06, 2026 @10:18AM (#46513353)
> While Rust isn’t “certified” out of the box, it provides attributes that facilitate certification. By design, Rust restricts certain low-level operations and enforces strict memory safety rules, effectively shifting much of the error-checking and verification into compile-time. This means that issues that might otherwise be found by multiple external tools in C/C++ are caught early during the Rust build process.

I think your link agrees with me, actually.

Re:C Is Best by steveklabnik on Tuesday January 06, 2026 @10:40AM (#46513652)
https://ferrocene.dev/

DO-178C isn’t there yet, but I believe I heard that it’s coming. In general, Ferrous Systems works with customer demand, which has been more automotive to start.

Re:C Is Best by irishcoffee on Wednesday January 07, 2026 @07:43AM (#46525781)
I believe is may come, that would be really neat.

Actually having it happen, someone is going to be out 10-30 million bucks. And again for each new compiler version.

Re:C Is Best by steveklabnik on Wednesday January 07, 2026 @11:00AM (#46527916)
Qualifying Ferrocene was way, way, way less expensive than that, and they've already had multiple versions of Rust qualified. The incremental qualifications are even easier and cheaper than the initial one is.
Re:C Is Best by irishcoffee on Wednesday January 07, 2026 @11:34AM (#46528463)
26262 is a lot less expensive than DO-178.
Re:C Is Best by steveklabnik on Wednesday January 07, 2026 @02:40PM (#46531426)
I'd believe it, but from talking about this with the Ferrocene folks, there's just structural issues why it was much easier to qualify rustc than it has been to qualify C compilers. This is how they're able to offer the product at a significantly lower price point, and how they've been able to fairly regularly re-qualify new versions quickly.

It is certainly non-trivial.

Re:C Is Best by monocasa on Tuesday January 06, 2026 @01:39PM (#46516558)
> With developments such as the Ferrocene-qualified compiler, Rust can now meet all the analysis requirements under DO-178C, one of the most stringent safety-critical standards worldwide.
Re:C Is Best by irishcoffee on Wednesday January 07, 2026 @07:38AM (#46525732)
“Can meet” vs “has met” is the entire difference.

Clearly C “can meet” and “has met” DO-178. So, I posit that more languages than C “can meet” this standard.

Proving it is the very hard, very expensive part.

Oh, and whatever version of the rust compiler that gets certified will be locked down as the only certified toolchain. No more compiler updates every 6 weeks. Unless you go though the whole process again.

Re:C Is Best by steveklabnik on Wednesday January 07, 2026 @11:03AM (#46527973)
Ferrocene has qualified Rust 1.68.2, 1.76.0, 1.79.0, 1.81.0, 1.83.0, 1.86.0, 1.87.0, 1.89.0, with 1.91.0 in the upcoming release.

It's not every six weeks, but it's far faster than once every three years.

Re:C Is Best by ok123456 on Tuesday January 06, 2026 @10:07AM (#46513199)
The DOD also made the Waterfall method THE standard software development process.
Re:C Is Best by Koshkin on Tuesday January 06, 2026 @10:15AM (#46513312)
You mean, "DOW"
Re:C Is Best by ok123456 on Tuesday January 06, 2026 @12:04PM (#46514983)
No. I don't.
Re:C Is Best by layer8 on Tuesday January 06, 2026 @10:33AM (#46513553)
Department of Waterfall?
Re:C Is Best by zabzonk on Tuesday January 06, 2026 @11:00AM (#46514007)
Department of War.
Re:C Is Best by quesera on Tuesday January 06, 2026 @11:36AM (#46514549)
That is not the official name.
Re:C Is Best by runjake on Tuesday January 06, 2026 @03:13PM (#46517962)
It's worth pointing out the Department of Defense was named the Department of War for over 150 years, up until 1947.

https://en.wikipedia.org/wiki/United_States_Department_of_Wa...

Re:C Is Best by quesera on Tuesday January 06, 2026 @05:00PM (#46519464)
True, but it required congressional approval to change the name then, and it would now as well.

This congress is not likely to approve it. And the next congress, even less so.

That said, "ever" is probably too strong. There's a window wherein the chaos which is currently being actively created by the US will develop to an extent that compels the US (or is sold to US voters as a necessary step) to adopt a foreign policy where it would be the more appropriate title. And if the adults can't manage that with charismatic leadership in the next election cycle or two, we could be right back here again, with quasi-legitimate geopolitical justification for the sort of big-stick wagging we see today.

I honestly think this is the goal, and I'm not sure the American people are up to the challenge of preventing it.

Re:C Is Best by zabzonk on Tuesday January 06, 2026 @05:24PM (#46519692)
In the UK, War Office --> Ministry of Defence, in the 60s I think.
Re:C Is Best by lelanthran on Tuesday January 06, 2026 @10:13AM (#46513277)
> The DOD also made the Waterfall method THE standard software development process.

I'm sure they also made a few bad decisions too :-P

Re:C Is Best by wy1981 on Tuesday January 06, 2026 @11:07AM (#46514125)
> Every project and programmer shouldn't feel they have to justify their choice not to use Rust

Maybe writing about it was taken as an opportunity to clarify their own thinking about the topic?

Re:C Is Best by alexpadula on Tuesday January 06, 2026 @08:48AM (#46512179)
I get asked this all the time regarding TidesDB. Why didn’t you choose Rust? Well.

Yeah this super common. Great comment.

Re:C Is Best by wat10000 on Tuesday January 06, 2026 @09:58AM (#46513070)
Every serious project should be able to justify its choice of tools. "Because I feel like it" is fine for hobby projects or open-source passion projects, but production-worthy software should have reasoning behind its choices. That reasoning can be something like "it's most effective for us because we know it better" but it should be a deliberate, measured choice.

SQLite is an example of an extremely high quality software project. That encompasses not only the quality of the software itself, but the project management around it. That includes explaining various design choices, and this document explaining the choice of language is just one of many such explanations.

Re:C Is Best by alexpadula on Tuesday January 06, 2026 @11:23AM (#46514378)
Indeed, indeed.
Re:C Is Best by alansaber on Tuesday January 06, 2026 @08:56AM (#46512273)
We (especially management) are trained to always want shiny new thing. Also it's an easy line of dialogue.
Re:C Is Best by brabel on Tuesday January 06, 2026 @10:12AM (#46513254)
Funny how managers get blamed for both wanting new things and for not wanting new things. In the Java 6 days every dev wanted to upgrade to 7 and later 8… but the meme was that their manager wouldn’t ever let them.
Re:C Is Best by NuclearPM on Tuesday January 06, 2026 @11:54AM (#46514833)
> a bit less in recent years, to use OOP.

That’s an understatement.

Re:C Is Best by CuriouslyC on Tuesday January 06, 2026 @09:17AM (#46512533)
OOP was always debatable, but with the rise of AI agents I'd go so far as to say it's objectively bad now. AI is much better at reasoning about pure function grammars than imperative classes with inheritance; abstractions that aren't airtight are bug factories.
Re:C Is Best by hmry on Tuesday January 06, 2026 @09:11AM (#46512452)
Yeah, results are what matters. SQLite's process seems to produce solid bug-free results.

My only complaint would be that there's many SQL features I want to use which aren't supported. Surely some part of that is deliberately restricted scope, but some might also be dev velocity issues.

DuckDB (C++) can be used like an SQLite with more SQL features, but it's also a lot buggier. Segfaults from your database are not what you want.

So still hoping for some alternative to come along (or maybe I'll need to write it myself)

Re:C Is Best by chasil on Tuesday January 06, 2026 @09:50AM (#46512956)
What isn't supported? After window functions were added, what else is missing?
Re:C Is Best by hmry on Tuesday January 06, 2026 @10:17AM (#46513335)
The ones that come to mind immediately are more ALTER statements (especially adding non-virtual columns), DATE, TIME, and TIMESTAMP types and their associated functions, and ARRAY types. Although I don't wish to disparage SQLite, they do support a lot of features. Just that I constantly run into the ones they don't, with my use cases.

And beyond standard SQL, stuff like hashmap/bloom filter/vector indices, nearest neighbor search, etc...

Re:C Is Best by coffeemug on Tuesday January 06, 2026 @01:05PM (#46516034)
Not always, but sometimes, new things are just better.

One example is null-- a billion dollar mistake as Tony Hoare called it. A Maybe type with exhaustive pattern matching is so dramatically better, it can be worth switching just for that feature alone.

Re:C Is Best by gf000 on Tuesday January 06, 2026 @03:47PM (#46518451)
This "new" thing could have grandkids now :D

ML is not some new development, it just took this long to get some of its ideas mainstream.

Re:C Is Best by paulf38 on Wednesday January 07, 2026 @05:54AM (#46524883)
OOP is pretty much has-been.

Value semantics is the hot thing now I'd say.

Re:C Is Best by pjmlp on Wednesday January 07, 2026 @10:50AM (#46527774)
That is why all major operating systems GUIs don't use it, yep.
Re:C Is Best by snvzz on Wednesday January 07, 2026 @07:00AM (#46525399)
>justify their choice not to use Rust (or Zig)

It's disingenuous to lump them together. It is the former that does the whole toxic, pushy advocacy routine.

Re:C Is Best by blank_state on Wednesday January 07, 2026 @01:57PM (#46530836)
Rust programmers have this "holier than you" attitude that is so toxic. It's essentially wokeism for programming. No wonder it originates from San Francisco, from all places.

The language itself features interesting ideas, many of them borrowed (pun intended) from Haskell, so not that new after all. But the community behavior proved consistently abysmal. A real put off.