Live data from Hacker News

Claude Code uses Bun written in Rust now

simonwillison.net

911–920 of 920 posts

Re: Claude Code uses Bun written in Rust now

#911

Earlier quoted context omitted.

You keep "asking" for evidence but the only evidence presented by yourself is that you have merely surface-level understanding of the subject matter, and are looking for arguments, not insight and critical examination.

It's your claim that destructors are harmful so the burden of proof is on you. People use them because by default values have scope based lifetimes and destructors unify the handling of stack based values which require no explicit cleanup with data structures that heap allocate, which require no explicit cleanup once the destructor is implemented. This is the opposite of C where even though the resource cleanup needs…

> It's your claim that destructors are harmful so the burden of proof is on you.

I have given a variety of arguments why I think the C++ RAII specifically has downsides. You can accept them or ignore them, but don't act like I didn't give arguments.

> People use them because by default values have scope based lifetimes and destructors unify the handling of stack based values which require no explicit cleanup with data structures that heap allocate,

Once again you're explaining beginner C++ do me. Are you still doubting if I understand this argument? My response to this was and is, if you have primarily stack scoped lifetimes, you are writing beginner programs. This is scripting and plumbing. It's not interesting to me. Systems programming is not so much about stack scoped lifetimes.

RAII systematicing object lifetimes and cleanup, thus enabling exceptions and implicit or uncontrolled control flow, may sound nice on paper, but turns out we shouldn't want them in the first place. What RAII leaves for me is a system that will automatically call nested object's destructors when I delete something. It's not something I want in general, I think it has more downsides than upsides for the code I'm writing. I've actually tried to use RAII many times and I've concluded it doesn't work for me.

> This is exaggerated when there are multiple returns, gotos, macros and other sources of branching especially for error handling.

If I were you, my response would be: The burden of proof is on you, show the evidence. But my answer is, yes that is right, but everything is a tradeoff, and the issues caused by manual cleanup are also somewhat exaggerated by C++ people, and the issues caused by blindly buying into the corset of C++ types are not well understood by C++ zealots (I've done my best at explaining them).

Issues caused by C approach are also a matter of design and approach to programming in general. It also depends on the actual problem you're solving. The linux kernel for example doesn't exactly have the easiest or most beautiful code to follow, but surely it's one of the most technical codebases out there, one that solves difficult problems (performant resource multiplexing for programs that it doesn't even know). On the other hand, the debugger code base I've referenced doesn't have any gotos for example, nor even early returns (or almost none, not sure).

Find me a single example of programs that run as fast and are as productively maintained as these two codebases in their respective areas? I believe there aren't any.

This should be plenty evidence to a reasonable mind, but that isn't you.

Re: Claude Code uses Bun written in Rust now

#912

Earlier quoted context omitted.

It's your claim that destructors are harmful so the burden of proof is on you. People use them because by default values have scope based lifetimes and destructors unify the handling of stack based values which require no explicit cleanup with data structures that heap allocate, which require no explicit cleanup once the destructor is implemented. This is the opposite of C where even though the resource cleanup needs…

> It's your claim that destructors are harmful so the burden of proof is on you. I have given a variety of arguments why I think the C++ RAII specifically has downsides. You can accept them or ignore them, but don't act like I didn't give arguments. > People use them because by default values have scope based lifetimes and destructors unify the handling of stack based values which require no explicit cleanup with dat…

I have given a variety of arguments why I think the C++ RAII specifically has downsides.

I don't think you did, I think you just said it has downsides over and over.

Once again you're explaining beginner C++ do me.

Don't ask for basic knowledge then get upset when you get it.

My response to this was and is, if you have primarily stack scoped lifetimes, you are writing beginner programs.

This is what the vast majority of values have. Some escape one scope and get cleaned up in another one. This also includes values inside data structures.

It's not something I want in general, I think it has more downsides than upsides for the code I'm writing. I've actually tried to use RAII many times and I've concluded it doesn't work for me.

Again, this isn't an explanation, it's just you saying "I don't think it's good, I don't like it", but you aren't explaining why. This isn't evidence, it's just you restating "this is bad". Why is it bad? "I told you it's bad!!".

thus enabling exceptions and implicit or uncontrolled control flow

Exceptions aren't uncontrolled flow and you can also not use them. Something else being enabled doesn't mean the unrelated feature is bad. This also implies that every other language that isn't C is terrible because they have some sort of automatic cleanup. Now java and python are unstructured by your own definition?

If I were you, my response would be: The burden of proof is on you, show the evidence.

You don't have an explanation of why the burden of proof is on me. Everyone uses these techniques in system software now. You are the odd person out, that's why the burden of proof is on you.

I also gave you a very good explanation and you said "you're explaining basic C++ to me". I am, you asked for it and you didn't poke any hole in why it's wrong.

the issues caused by manual cleanup are also somewhat exaggerated by C++ people

It means memory leaks and crashes which everyone has been fighting for 50 years.

This should be plenty evidence to a reasonable mind, but that isn't you.

Someone running a marathon without shoes doesn't mean shoes are bad. Just because an old program is written in C, that has no bearing on if other tools are good or not. This is not a logical conclusion. Unix was written in C too, does that mean destructors are bad? No one said it's impossible to write a program in C now that C++ exists.

Why can't you give a single basic explanation instead of making the same claim over and over?

Re: Claude Code uses Bun written in Rust now

#913

Earlier quoted context omitted.

> It's your claim that destructors are harmful so the burden of proof is on you. I have given a variety of arguments why I think the C++ RAII specifically has downsides. You can accept them or ignore them, but don't act like I didn't give arguments. > People use them because by default values have scope based lifetimes and destructors unify the handling of stack based values which require no explicit cleanup with dat…

I have given a variety of arguments why I think the C++ RAII specifically has downsides. I don't think you did, I think you just said it has downsides over and over. Once again you're explaining beginner C++ do me. Don't ask for basic knowledge then get upset when you get it. My response to this was and is, if you have primarily stack scoped lifetimes, you are writing beginner programs. This is what the vast majority…

> I don't think you did, I think you just said it has downsides over and over.

Show evidence of your claim.

> Don't ask for basic knowledge then get upset when you get it.

Where did I ask for basic knowledge? You are hallucinating. I've repeatedly and explicitly told you to shut up explaining beginner things. You are trying to refute my criticisms of RAII with your silly explanations of how RAII works. That's not how an argument or "evidence" works.

> Exceptions aren't uncontrolled flow and you can also not use them.

I would rather call it _implicit_ flow but they also lead to losing control over control flow because of that. Yes, I can just not use exceptions, and also avoid gotos and use them in a principle way, and do cleanup in a principled way. And then I can also do without RAII and without all the baggage I'd have to buy into in order to use it.

> You don't have an explanation of why the burden of proof is on me.

Please p* off man. You're being ridiculous.

> It means memory leaks and crashes which everyone has been fighting for 50 years.

Like you have been on your Linux, Windows, or Mac machine? Maybe you are running a linux machine with an uptime of weeks, months, or even years?

> Someone running a marathon without shoes doesn't mean shoes are bad.

You claiming to run a marathon with a 25kg backpack doesn't mean you don't lie, and it also doesn't prove running without it isn't the better approach.

> Why can't you give a single basic explanation instead of making the same claim over and over?

The only person not giving explanation beyond basic boring introductory C++ RAII school, that's YOU my friend. I've been giving a lot of explanations what I think is problematic, somehow it seems you're mentally unable to acknowledge them.

Re: Claude Code uses Bun written in Rust now

#914

Earlier quoted context omitted.

> It's your claim that destructors are harmful so the burden of proof is on you. I have given a variety of arguments why I think the C++ RAII specifically has downsides. You can accept them or ignore them, but don't act like I didn't give arguments. > People use them because by default values have scope based lifetimes and destructors unify the handling of stack based values which require no explicit cleanup with dat…

I have given a variety of arguments why I think the C++ RAII specifically has downsides. I don't think you did, I think you just said it has downsides over and over. Once again you're explaining beginner C++ do me. Don't ask for basic knowledge then get upset when you get it. My response to this was and is, if you have primarily stack scoped lifetimes, you are writing beginner programs. This is what the vast majority…

How about you do the following two Google (or AI) searches

"Please give me examples of great systems software written in plain C or C style procedural C++"

"Please give me examples of great systems software written in modern C++, as opposed to procedural C style C++ or plain C".

Why does it seem like the majority of core infrastructure, like Linux kernel (also vast parts of Windows/Mac OS), PostgresQL, Sqlite3, Git, OpenSSH, GCC, but also e.g. MS Office/Excel, are written in plain procedural code and not in modern C++? For the latter, I get stuff like "ScyllaDB NoSQL database" or "Envoy Proxy" or whatever, what is that even and why should I care or how do I know they're actually technically solid products and not just hype?

My claim: The arguments that I've given (but you keep insisting I didn't give them) play a huge rule in why that is so. You can use C++ RAII for plumbing and high-level stuff. But if you try to actually implement technically interesting things, it won't help you at all, it's just getting in the way.

Re: Claude Code uses Bun written in Rust now

#915

Earlier quoted context omitted.

> I have never once heard a lab or professional say “x model can do anything” Yeah, they "merely" say that they're about to break the singularity in a couple of years, that it's too capable to be safe to release, that it's going to take 50% (or all, depening on the day and audience) of programmers out of work, that it's smarter than Nobel prize winners, that their programmers don't write anything themselves anymore,…

Who is “they?” Again… provide me a quote from someone doing this every day that says: “they're about to break the singularity in a couple of years” The only people saying this stuff are random Internet commenters, breathless reporters and reactionaries. The only person on record for a statement like this was Geoff Hinton about radiologists and he has since walked back his statement

SAM ALTMAN: “We are close to creating a genie that can grant any wish.”

https://x.com/TheChiefNerd/status/2081204789371621744

Re: Claude Code uses Bun written in Rust now

#917

Earlier quoted context omitted.

I have given a variety of arguments why I think the C++ RAII specifically has downsides. I don't think you did, I think you just said it has downsides over and over. Once again you're explaining beginner C++ do me. Don't ask for basic knowledge then get upset when you get it. My response to this was and is, if you have primarily stack scoped lifetimes, you are writing beginner programs. This is what the vast majority…

How about you do the following two Google (or AI) searches "Please give me examples of great systems software written in plain C or C style procedural C++" "Please give me examples of great systems software written in modern C++, as opposed to procedural C style C++ or plain C". Why does it seem like the majority of core infrastructure, like Linux kernel (also vast parts of Windows/Mac OS), PostgresQL, Sqlite3, Git,…

How about you do the following two Google (or AI) searches

Why don't you do it so you can make your own argument.

Why does it seem like the majority of core infrastructure,

Why are projects started decades not using modern C++ that came decades after they were started?

This doesn't have anything to do with destructors.

The arguments that I've given (but you keep insisting I didn't give them)

You didn't give arguments, you made claims based on other people doing something different decades before modern C++ existed. Someone managing to dig a hole with their hands doesn't make a shovel a bad tool. Animals dig holes all the time, people are better at it.

But if you try to actually implement technically interesting things, it won't help you at all, it's just getting in the way.

This again is your claim which you haven't been able to explain in any way.

Re: Claude Code uses Bun written in Rust now

#918

Earlier quoted context omitted.

I have given a variety of arguments why I think the C++ RAII specifically has downsides. I don't think you did, I think you just said it has downsides over and over. Once again you're explaining beginner C++ do me. Don't ask for basic knowledge then get upset when you get it. My response to this was and is, if you have primarily stack scoped lifetimes, you are writing beginner programs. This is what the vast majority…

> I don't think you did, I think you just said it has downsides over and over. Show evidence of your claim. > Don't ask for basic knowledge then get upset when you get it. Where did I ask for basic knowledge? You are hallucinating. I've repeatedly and explicitly told you to shut up explaining beginner things. You are trying to refute my criticisms of RAII with your silly explanations of how RAII works. That's not how…

> I don't think you did, I think you just said it has downsides over and over.

Show evidence of your claim.

That would be proving a negative, which is another logical fallacy.

Please p off man. You're being ridiculous.*

If that were true you could explain why.

I would rather call it _implicit_ flow but they also lead to losing control over control flow because of that

But it's just running something you need to run anyway and it's optional. Destructors don't need branching, they can just run a single function like free.

And then I can also do without RAII and without all the baggage I'd have to buy into in order to use it.

Again the "baggage" is the part you can't seem to explain.

Like you have been on your Linux, Windows, or Mac machine? Maybe you are running a linux machine with an uptime of weeks, months, or even years?

Are you trying to say people never write memory leaks or forget to clean up resources in C? Something being done with huge amounts of efforts doesn't mean a better way to do things is bad.

You claiming to run a marathon with a 25kg backpack doesn't mean you don't lie, and it also doesn't prove running without it isn't the better approach.

This doesn't mean anything. Now you're trying to say (without evidence) that someone is lying? Destructors don't add any size to a program.

Is this your only argument after dozens of messages? Running a function with no branching destroys control flow and running a tiny function that runs what you need to call anyway is bloat?

I've been giving a lot of explanations what I think is problematic,

No, you just said it's problematic over and over, that's not an explanation.

Re: Claude Code uses Bun written in Rust now

#919

Earlier quoted context omitted.

> I don't think you did, I think you just said it has downsides over and over. Show evidence of your claim. > Don't ask for basic knowledge then get upset when you get it. Where did I ask for basic knowledge? You are hallucinating. I've repeatedly and explicitly told you to shut up explaining beginner things. You are trying to refute my criticisms of RAII with your silly explanations of how RAII works. That's not how…

> I don't think you did, I think you just said it has downsides over and over. Show evidence of your claim. That would be proving a negative, which is another logical fallacy. Please p off man. You're being ridiculous.* If that were true you could explain why. I would rather call it _implicit_ flow but they also lead to losing control over control flow because of that But it's just running something you need to run a…

You are insufferable. Get lost.

Re: Claude Code uses Bun written in Rust now

#920

Earlier quoted context omitted.

> I don't think you did, I think you just said it has downsides over and over. Show evidence of your claim. That would be proving a negative, which is another logical fallacy. Please p off man. You're being ridiculous.* If that were true you could explain why. I would rather call it _implicit_ flow but they also lead to losing control over control flow because of that But it's just running something you need to run a…

You are insufferable. Get lost.

You don't get to reply and tell me I'm lying about something then get upset when I reply back. You can always actually explain in depth why I'm wrong.
Post reply on HN