Hacker Newsnew | past | comments | ask | show | jobs | submit | irishcoffee's commentslogin

Should the US adopt the European model? Open an inquiry to explore an investigation that could become en exploratory committee? Sounds like a bad idea.

> Even if you do, you now have an effective comment that tells you where to look if you ever get suspicious behavior.

By the time suspicious behavior happens, isn’t it kind of a critical inflection point?

For example, the news about react and next that came out. Once the code is deployed, re-deploying (especially with a systems language that quite possibly lives on an air-gapped system with a lot of rigor about updates) means you might as well have used C, the dollar cost is the same.


Are you with a straight face saying that occasionally having a safety bug in limited unsafe areas of Rust is functionally the same as having written the entire program in an unsafe language like C?

One, the dollar cost is not the same. The baseline floor of quality will be higher for a Rust program vs. a C program given equal development effort.

Second, the total possible footprint of entire classes of bugs is zero thanks to design features of Rust (the borrowck, sum types, data race prevention), except in a specifically delineated areas which often total zero in the vast majority of Rust programs.


> The baseline floor of quality will be higher for a Rust program vs. a C program given equal development effort.

Hmm, according to whom, exactly?

> Second, the total possible footprint of entire classes of bugs is zero thanks to design features of Rust (the borrowck, sum types, data race prevention), except in a specifically delineated areas which often total zero in the vast majority of Rust programs.

And yet somehow the internet went down because of a program written in rust that didn’t validate input.


> Hmm, according to whom, exactly?

Well, Google for one. https://security.googleblog.com/2025/11/rust-in-android-move...

> And yet somehow the internet went down because of a program written in rust that didn’t validate input.

You're ignoring other factors (it wasn't just Cloudflare's rust code that led to the issue), but even setting that aside your framing is not accurate. The rust program went down because the programmer made a choice that, given invalid input, it should crash. This could happen in every language ever made. It has nothing to do with rust.


Google's Android teams also categorize old C code as C++, and mix gotos into their modern C++ code.

> This could happen in every language ever made. It has nothing to do with rust.

Except it does. This also has to do with culture. In Rust, I get the impression that one can set it up as roughly two communities.

The first does not consider safety, security and correctness to be the responsibility of the language, instead they consider it their own responsibility. They merely appreciate it when the language helps with all that, and take precautions when the language hinders that. They try to be honest with themselves.

The second community is careless, might make various unfounded claims and actions that sometimes border on cultish and gang mob behavior and beliefs, and can for instance spew unwrap() all over codebases even when not appropriate for that kind of project, or claim that a Rust project is memory safe even when unsafe Rust is used all over the place with lots of basic bugs and UB-inducing bugs in it.

The second community is surprisingly large, and is severely detrimental to security, safety and correctness.


Again, this has nothing to do with the point at hand, which is that "in any language, a developer can choose the crash the problem if a unrecoverable state happens". That's it.

Tell me about how these supposed magical groups have anything at all to do with language features. What language can magically conjure triple the memory from thin air because the upstream query returned 200+ entries instead of the 60-ish you're required to support?


I don't think you're actually disagreeing with the person you're responding to here. Even if you take your grouping as factual, there's nothing that limits said grouping to Rust programmers. Or in other words:

> This could happen in every language ever made. It has nothing to do with rust.


> And yet somehow the internet went down because of a program written in rust that didn’t validate input.

What? The Cloudflare bug was from a broken system configuration that eventually cascaded into (among other things) a Rust program with hardcoded limits that crashed loudly. In no way did that Rust program bring down the internet; it was the canary, not the gas leak. Anybody trying to blame Rust for that event has no idea what they're talking about.


> And yet somehow the internet went down because of a program written in rust that didn’t validate input.

Tell me which magic language creates programs free of errors? It would have been better had it crashed and compromised memory integrity instead of an orderly panic due to an invariant the coder didn't anticipate? Type systems and memory safety are nice and highly valuable, but we all know as computer scientists we have yet to solve for logic errors.


> And yet somehow the internet went down because of a program written in rust that didn’t validate input.

No, it _did validate_ the input, and since that was invalid it resulted in an error.

People can yap about that unwrap all they want, but if the code just returned an error to the caller with `?` it would have resulted in a HTTP 500 error anyway.


> might as well have used C, the dollar cost is the same.

When your unsafe area is small, you put a LOT of thought/testing into those small blocks. You write SAFETY comments explaining WHY it is safe (as you start with the assumption there will be dragons there). You get lots of eyeballs on them, you use automated tools like miri to test them. So no, not even in the same stratosphere as "might as well have used C". Your probability of success vastly higher. A good Rust programmer uses unsafe judiciously, where as a C programmer barely blinks as they need ensure every single snippet of their code is safe, which in a large program, is an impossible task.

As an aside, having written a lot of C, the ecosystem and modern constructs available in Rust make writing large scale programs much easier, and that isn't even considering the memory safety aspect I discuss above.


SAFETY comments do not magically make unsafe Rust correct nor safe. And Miri cannot catch everything, and is magnitudes slower than regular program running.

https://github.com/rust-lang/rust/commit/71f5cfb21f3fd2f1740...

https://materialize.com/blog/rust-concurrency-bug-unbounded-...


I think you might be misreading GP's comment. They are not claiming that SAFETY comments and MIRI guarantee correctness/safety; those are just being used as examples of the extra effort that can be and are expended on the relatively few unsafe blocks in your codebase, resulting in "your probability of success [being] vastly higher" compared to "might as well have used C".

This just skips the:

> First, if you aren't writing device drivers/kernels or something very low level there is a high probability your program will have zero unsafe usages in it.

from the original comment. Meanwhile all C code is implicitly “unsafe”. Rust at least makes it explicit!

But even if you ignore memory safety issues bypassed by unsafe, Rust forces you to handle errors, it doesn’t let you blow up on null pointers with no compiler protection, it allows you to represent your data exhaustively with sum types, etc etc etc


Isn’t rust proffered up as a systems language? One that begged to be accepted into the Linux kernel?

Don’t device drivers live in the Linux kernel tree?

So, unsafe code is generally approved in device driver code?

Why not just use C at that point?


I am quite certain that someone who has been on HN as long as you have is capable of understanding the difference between 0% compiler-enforced memory safety in a language with very weak type safety guarantees and 95%+ of code regions even in the worst case of low-level driver code that performs DMA with strong type safety guarantees.

Please explain the differences in typical aliasing rules between C and Rust. And please explain posts like

https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/

https://news.ycombinator.com/item?id=41947921

https://lucumr.pocoo.org/2022/1/30/unsafe-rust/


The first two is the same article, but they point out that certain structures can be very hard to write in rust, with linked lists being a famous example. The point stands, but I would say the tradeoff is worth it (the author also mentions at the end that they still think rust is great).

The third link is absolutely nuts. Why would you want to initialize a struct like that in Rust? It's like saying a functional programming language is hard because you can't do goto. The author sets themselves a challenge to do something that absolutely goes against how rust works, and then complains how hard it is.

If you want to do it to interface with non-rust code, writing a C-style string to some memory is easier.


You phrase that as if 0-5% of a program being harder to write disqualifies all the benefits of isolating memory safety bugs to that 0-5%. It doesn't.

And it can easily be more than 5%, since some projects both have lots of large unsafe blocks, and also the presence of an unsafe block can require validation of much more than the block itself. It is terrible of you and overall if my understanding is far better than yours.

And even your argument taken at face value is poor, since if it is much harder, and it is some of the most critical code and already-hard code, like some complex algorithm, it could by itself be worse overall. And Rust specifically have developers use unsafe for some algorithm implementations, for flexibility and performance.


> since if it is much harder, and it is some of the most critical code and already-hard code, like some complex algorithm, it could by itself be worse overall.

(Emphasis added)

But is it worse overall?

It's easy to speculate that some hypothetical scenario could be true. Of course, such speculation on its own provides no reason for anyone to believe it is true. Are you able to provide evidence to back up your speculation?


Even embedded kernels can and regularly do have < 5% unsafe code.

Is three random people saying unsafe Rust is hard supposed to make us forget about C’s legendary problems with UB, nil pointers, memory management bugs, and staggering number of CVEs?

You have zero sense of perspective. Even if we accept the premise that unsafe Rust is harder than C (which frankly is ludicrous on the face of it) we’re talking about a tiny fraction of the overall code of Rust programs in the wild. You have to pay careful attention to C’s issues virtually every single line of code.

With all due respect this may be the singular dumbest argument I’ve ever had the displeasure of participating in on Hacker News.


> Even if we accept the premise that unsafe Rust is harder than C (which frankly is ludicrous on the face of it)

I think there's a very strong dependence on exactly what kind of unsafe code you're dealing with. On one hand, you can have relatively straightforwards stuff like get_unsafe or calling into simpler FFI functions. On the other hand, you have stuff like exposing a safe, ergonomic, and sound APIs for self-referential structures, which is definitely an area of active experimentation.

Of course, in this context all that is basically a nitpick; nothing about your comment hinges on the parenthetical.


[flagged]


> Shold one compare Rust with C or Rust with C++?

Well, you're the one asking for a comparison with C, and this subthread is generally comparing against C, so you tell us.

> Modern C++ provides a lot of features that makes this topic easier, also when programs scale up in size, similar to Rust. Yet without requirements like no universal aliasing. And that despite all the issues of C++.

Well yes, the latter is the tradeoff for the former. Nothing surprising there.

Unfortunately even modern C++ doesn't have good solutions for the hardest problems Rust tackles (yet?), but some improvement is certainly more welcome than no improvement.

> Which is wrong

Is it? Would you be able to show evidence to prove such a claim?


Because writing proper kernel C code requires decades of experience to navigate the implicit conventions and pitfalls of the existing codebase. The human pipeline producing these engineers is drying up because nobody's interested in learning that stuff by going through years of patch rejection from maintainers that have been at it since the beginning.

Rust's rigid type system, compiler checks and insistence on explicitness forces a _culture change_ in the organization. In time, this means that normal developers will regain a chance to contribute to the kernel with much less chance of breaking stuff. Rust not only makes compiled binary more robust but also makes the codebase more accessible.


> But wanted to give everyone a way to see how these models think…

Think? What exactly did “it” think about?


You can click in to the chart and see the conversation as well as for each trade what was the reasoning it gave for it

A model can't tell you why it made the decision.

What it can do is inspect the decision it made and make up a reason a human might have said when making the decision.


"Pass the salt? You mean pass the sodium chloride?"

He didn’t. He was a fad of high school English teachers in 2000-2005, so now a handful of 30-somethings think he was some kind of important figure. Silly.


Please stop posting unsubstantive comments to HN. You've done it a lot, unfortunately, and it's not what this site is for.

https://news.ycombinator.com/newsguidelines.html


How is it unsubstantive?


It is a shallow dismissal, snarky, and a non sequitur, for starters.


Should I find all the other comments that mimic mine in the past week to see if you’ve singled them out? There’s twitter threads full of them.


You will certainly find lots of comments that should have been moderated but weren't. That's because we don't come close to seeing everything here.

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...


Never long dang you’re right. I won’t comment or submit anything again. I clearly don’t understand the criteria. Cheers.


You're entirely welcome to participate here, and it's not hard to understand the criteria, if you read the guidelines and take the intended spirit of the site to heart. Basically, we want to have a place on the internet that's good for curious conversation and manages to escape the default outcome of internet forums, which is to decline and eventually destroy themselves.

If you take a look at these links maybe the reason why we do things this way will get a little clearer, and if not, we're happy to answer any questions from users who sincerely want to use HN as intended.

https://news.ycombinator.com/newswelcome.html

https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...

https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...


> He didn’t. He was a fad of high school English teachers in 2000-2005

"The Waste Land is a poem by T. S. Eliot, widely regarded as one of the most important poems of the 20th century and a central work of modernist poetry. Published in 1922"


It’s hot takes like this that make me come to HN to read ppl’s opinions on literary figures. It’s as if the Nebraska Farm Report had a society weddings page.

Talking about 20th century critics and not mentioning Elliot is like talking about pop music in 1960s Hamburg and failing to mention the Beatles.


You learn how to read and you learn basic math. That’s really it from a useful educational standpoint. Happy to debate it.


My children have learned far more than reading and basic math in their K-8 schools. This is an obvious fact and not open for debate. Distance learning is not an acceptable replacement. It's time to immediately reopen all primary schools. Education is essential and worth the risk.


Are you ready to take responsibility for all the people that would either die or have their health damaged by the virus? Including probably a significant number of teachers, parents, and even a few children?


You have decided it is worth the risk to your family in your judgement. Fine. But to which risk are you referring? The risk to your children? How about the risks to the teachers? How about the other staff? How about the child's grandparents? How about the other children in the classroom and their families? You are asking a large number of people to take considerable risk because you have decided classroom education RIGHT NOW is "worth the risk."

Nobody is suggesting the end of classroom education. The question is whether doing the best we can with distance learning for a time and postponement of classroom eduction until better treatments and/or vaccines come on line is a better choice. It is really not a big sacrifice to ensure the safety of about 4 million teachers and maybe another million or two staff persons.

Assuming the death rate is optimistically only 0.2%, that is about 12,000 teachers and staff deaths. Ignoring the thousands of other deaths originating from these cases, are you really saying that 12,000 deaths is a realistic price to pay so your child can go back into the classroom NOW rather than next year? Really?

The fact that this would be a very bad choice seems an "obvious fact and not open for debate."


GP isn’t proposing that only their child attend school. Instead, it’s an entire generation of children who will benefit from the delta of an extra in-person year of instruction.

Similarly, whatever factor you apply to count deaths, you can only count deaths above the baseline when considering the change in school policy.

It’s quite far from your side of “obvious fact and not open for debate”, IMO.


I quoted “obvious fact and not open for debate” from the previous note. Sarcasm on my part. My point is that this is NOT black and white and the net benefit of reopening is NOT an "obvious fact."


Nice way to intentionally misinterpret the stats

Unless most of your teachers are living in nursing homes, your numbers are way off.


> This is an obvious fact and not open for debate.

Not with that attitude, nope sure isn’t.

It is up for debate. I know for a fact you’re wrong. I was educated outside of any schooling system until the 9th grade. I learned basic math and was a voracious reader. I walked into 9th grade without missing a beat.


Back in the day this is how it worked. They changed it. Nobody that I can recall was complaining for it to change at the time. Circa 2006 I think.

edit: grammar


It was much smaller and less influential back then.


Ignoring the qt part entirely, I think qmake is the best of the bunch.


Qt is moving to CMake too. And the latest versions of CMake are as good, or better, than qmake. Add to that vcpkg and you will have a fantastic solution for managing dependencies.

Maybe CMake is not the best but is good enough and the new standard in the C++ world.


It’s really not good enough, it’s ok to admit it. Nobody likes CMake, it just somehow won the makefile generator wars. Having to a learn shitty, esoteric language to compile my code Is not something that makes me more productive.


I agree. qmake was much, much better to work with than cmake. I tend to believe the reason cmake won is because qmake was so associated with Qt. The best tech does not always win.


> Having to a learn shitty, esoteric language to compile my code Is not something that makes me more productive.

You say that but frankly between CMake code and Ant or msbuild ...


Qmake. It’s simple, it’s cross-platform, it gets out of my way.


it's also going the way of the dodo as Qt 6 is migrating to CMake :p


5 will get forked because of the way 6 is being licensed.



Android also settled with cmake, while keeping the original ndk-build makefile based one, after doing a couple of failed attempts to switch to something else.

After 10 years they are finally introducing AAR support for NDK projects, which is also built on top of cmake.


qmake is has very poor handling of dependencies between generate header files, like those used with protobuf.

https://github.com/jmesmon/qmake-protobuf-example


Knowing what I know about Qt and what I've done with it in my day job, it's basically the best kept secret on hn. What they're doing with 6+licensing... I'm not sure how I feel, but from a pure multi-platform framework it really is the bees knees.

I've taken c++ qt desktop apps that never had any intention of running on a phone, built them, ran them, everything "just worked. I was impressed.


I just wish it weren't stuck, anisotropically, ~10 years in the past. Maybe Qt6 will be better, but more likely it will be more and more QML.


Since QML uses Javascript it may be their best bet to attract new developers.


Yes, well, QML also uses JavaScript.


CI/CD + uh... doing your job? I build one app (same codebase) on 4 different platforms often, it isn't terribly hard.


The bank account numbers on a personal check or the one you give your employer for direct deposit?


Aren't those the same?


Yes


Heh welp pardon me for having more than one bank account


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: