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

I would say the impact of the borrow checker is exaggerated.

While I agree that Rust got it right by being more explicit, a lot of bugs in C/C++ can also easily avoided with good engineering practices. The Rust argument that it is mainly the fault of the programming language with C/C++ was always a huge and unfair exaggeration. Now with this entirely predictable ".unwrap" desaster (in general, not necessarily this exact scenarious), the "no true Rustacean would have put unwrap in production" fallacy is sad and funny at the same time.

> the "no true Rustacean would have put unwrap in production"

The "no unwrap" rule is common in most production codebases. Chill.


Could you point one that is Open source?

Unwrap is controversial. The problem is that if you remove it, it makes the bar even higher for newcomers to Rust. One solution is to make it unsafe (along with panic).

So an unhandled error condition after an configuration update similar to Crowdstrike - if they had just used a programming language where this can't happen due to the superior type system such as Rust. Oh wait.

IMHO and maybe counterintuitively, I do not think the existence of UB makes it harder to do formal verification or have safe C implementations. The reason is that you can treat it as an error if the program encounters UB, so one can either derive local requirements or add run-time checks (such as Fil-C) and then obtains spatial and temporal isolation of memory object.

I don't really agree, at least if the future looks like Rust. I much prefer C and I think an improved C can be memory safe even without GC.

> I think an improved C can be memory safe even without GC

That's a very interesting belief. Do you see a way to achieve temporal memory safety without a GC, and I assume also without lifetimes?


A simple pointer ownership model can achieve temporal memory safety, but I think to be convenient to use we may need lifetimes. I see no reason this could not be added to C.

A C with lifetimes would be nice, I agree.

Would be awesome if someone did a study to see if it's actually achievable... Cyclone's approach was certainly not enough, and I think some sort of generics or a Hindley-Milner type system might be required to get it to work, otherwise lifetimes would become completely unusable.


Yes, one needs polymorphism. Let's see. I have some ideas.

C does have the concept of lifetimes. There is just no syntax to specify it, so it is generally described along all the other semantic details of the API. And no it is not the same as for Rust, which causes clashes with the Rust people.

What clashes?

I think there was a discussion in the Linux kernel between a kernel maintainer and the Rust people, which started by the Rust people demanding formal semantics, so that they could encode it in Rust, and the subsystem maintainer unwilling to do that.

Ah, I thought you were talking about core language semantics in C.

I don't know enough Rust, to do such a comparison.

“The rust people” were also kernel maintainers.

Sorry, I'm not familiar with the titles of kernel developers. I thought only one of them was the subsystem maintainer.

One of them was a maintainer of that particular subsystem, but that doesn't mean that the other folks aren't also maintainers of other parts of the kernel.

There are too complex. And having suffered from endless hours debugging C++ template code in the past, I think C's macros are actually better - if done carefully.

Well, I guess anything is simple if you consider C++ as the only alternative.

My generics in C are quite simple in my opinion: https://uecker.codeberg.page/2025-07-02.html

Here is my take on this: https://uecker.codeberg.page/2025-07-20.html

(you could also create a version with capacity, of course, but I like it this way).


The people who say Rust is too complex just do not want to learn. /s

The advantage of having stuff in C and Fortran is that it can easily be used from other languages. I would also argue that your algorithm written in C would be far more readable.

Learning a manifold is not intelligence as it lacks the reasoning part.

Leaning the manifold is understanding. Reasoning, which takes place on the manifold, is applying that understanding.

I am not sure what you definition of "understanding" is that you apply here.

I mean understanding physics and the universe of natural possibilities; what can happen. Then comes why.

Fitting a manifold to a bunch of samples does not allow you to understand what can happen in the universe. For example, if you train a regular diffusion model on correct sudokus, it will produce sudokus with errors because it does not understand the rules.

You raise a good point for the diffusion case, which trains only on positive examples, but generally speaking negative examples will warp the manifold appropriately.

Sure, but you show a few correct examples to a human it will quickly pick up the correct rules. And this is understanding.

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

Search: