News for hackers. Stuff that matters.
Re:Using unwrap() in Rust is okay by burntsushi on Monday August 08, 2022 @08:00PM (#32392585)
Thank you, Random Internet Stranger, for teaching me such a valuable lesson. I now know never to use any language that is Turing complete.
Re:Using unwrap() in Rust is okay by lmm on Monday August 08, 2022 @10:45PM (#32393746)
Turing complete languages are legacy cruft. There are no compelling use cases where they're actually more expressive, and sheer code execution performance is never the bottleneck in a realistic-sized system.
Re:Using unwrap() in Rust is okay by burntsushi on Tuesday August 09, 2022 @09:04AM (#32397223)
Feel free to back it up with real examples. Otherwise, previous conversations with you have just been frustrating exchanges about pie-in-the-sky stuff. Just seems like you want to be bombastic for the sake of being bombastic.

> and sheer code execution performance is never the bottleneck in a realistic-sized system.

TIL that code execution perf doesn't matter and I've wasted almost a decade of my life focusing on it. Wow I wish you told me sooner!

What a ridiculous comment.

Re:Using unwrap() in Rust is okay by AshamedCaptain on Tuesday August 09, 2022 @09:53AM (#32397926)
> Just seems like you want to be bombastic for the sake of being bombastic.

Ironically, that's exactly how you seem when just drop the "Turing completeness" bomb on a discussion about error handling. It's very hard not to see it as a ridiculously childish tantrum, since not only there's no actual argument, it is by definition impossible for it to be relevant to the discussion.

Anyway, I would not be writing this if it wasn't because you keep pumping direct personal attacks to everyone who dares counter your posts, which are already in a terrible tone.

Re:Using unwrap() in Rust is okay by burntsushi on Tuesday August 09, 2022 @10:15AM (#32398276)
Thanks for the free lesson, Random Internet Stranger. I appreciate it. Unfortunately, the cognitive dissonance you give me is just too much to bare. Your wisdom is clearly beyond reproach, and so therefore Rust cannot be a systems language since it has panics. Yet, I and many others use Rust for systems programming. My brain might explode from the contradiction!
Re:Using unwrap() in Rust is okay by AshamedCaptain on Tuesday August 09, 2022 @10:21AM (#32398368)
> therefore Rust cannot be a systems language since it has panics

Or, the obvious alternative that I was trying to point out: your analysis is wrong, and therefore, assuming the language is not useless, there must be a proper alternative to "panics everywhere" * that you are not accounting for !

https://lkml.org/lkml/2021/4/14/1099

* This is just to explicitly write the phrase again before it is (again) twisted as calling for a strict prohibition of all non-terminating conditions or some other childish nonsense.

Even unwinding panics (which are exceptions in all but name) can be an alternative, and Rust does support them.

Re:Using unwrap() in Rust is okay by burntsushi on Tuesday August 09, 2022 @10:23AM (#32398406)
Cool, good thing I didn't say to panic everywhere.

That lkml post has zero relevance here. He's asking for fallible allocations. Which is totally reasonable.

Serious question: did you read the entire blog? If so, can you specifically point out passages you disagree with and why?

EDIT: And seriously, I started out this conversation with a serious comment asking you to elaborate on what you meant by asking something very concrete: how would you change the code example in my blog to conform to your view? You decided to flippantly respond with a non-answer in the first place. Why not go back to the original question I asked and give a real answer? If you don't know Rust, then use pseudo code. We're talking about a dozen lines here. It shouldn't take long.

Re:Using unwrap() in Rust is okay by AshamedCaptain on Monday August 08, 2022 @08:01PM (#32392591)
Happy to help, albeit I do not see why that is a conclusion of my argument.