News for hackers. Stuff that matters.
Re:C++ vs. Rust Build Times by Rusky on Friday January 06, 2023 @12:56PM (#34278327)
> In particular, a typical application design involves some variation of the Observer pattern (implementations can vary wildly), where views read/“observe” models owned by controllers. Why should I beat my head against the wall with a systems language? There should be an escape valve that doesn’t sacrifice memory safety.

The escape valve here that doesn't sacrifice memory safety is reference counting and perhaps interior mutability. (And this point certainly does involve pointers, if not void*.)

> I can’t create unbound trait/struct functors and then invoke them on strict references later?

You can't implement the `Fn` traits for your own types, but this shouldn't have any impact on what you can express, should it? If you're going to pass in references at the call site you can do that just as well with lambdas (or if you really want to use your own type, with a hand-rolled trait to replace `Fn`).

There are no comments on this comment yet.