Remix.run Logo
srcreigh 6 hours ago

I don't really want to learn how to use the borrow checker, LLM help or not, and I don't really want to use a language that doesn't have a reputation for very fast compile/dev workflow, LLM help or not.

Re; Go, I don't want to use a language that is slower than C, LLM help or not.

Zig is the real next Javascript, not Rust or Go. It's as fast or faster than C, it compiles very fast, it has fast safe release modes. It has incredible meta programming, easier to use even than Lisp.

ycombinatrix 5 hours ago | parent | next [-]

Writing code without the borrow checker is the same as writing code with the borrow checker. If it wouldn't pass the borrow checker, you're doing something wrong.

srcreigh 5 hours ago | parent | next [-]

Idk. Did you see the "Buffer reuse" section of this blog post? [1]

Kudos to that guy for solving the puzzle, but I really don't want to use a special trick to get the compiler to let me reuse a buffer in a for loop.

[1]: https://davidlattimore.github.io/posts/2025/09/02/rustforge-...

ycombinatrix an hour ago | parent [-]

I've never seen `split_off_mut` but I do use `split_at_mut` quite often to solve similar issues. Using a slice instead of using a Vec directly also tends to greatly simplify things.

I also don't fully understand the buffer reuse example. Why would you want to store references to a string after the string ceases to exist?

forrestthewoods 5 hours ago | parent | prev | next [-]

This is a n objectively false statement.

Rusts borrow checker is only able to prove at compile-time that a subset of correct programs are correct. There are many correct programs that the BC is unable to prove to be correct and therefore rejects them.

I’m a big fan of Rust and the BC. But let’s not twist reality here.

lmm 4 hours ago | parent | next [-]

> There are many correct programs that the BC is unable to prove to be correct and therefore rejects them.

There are programs that "work" but the reason they "work" is complicated enough that the BC is unable to understand it. But such programs tend to be difficult for human readers to understand too, and usually unnecessarily so.

ycombinatrix an hour ago | parent | prev [-]

>There are many correct programs that the BC is unable to prove to be correct and therefore rejects them.

No. The borrow checker rejects programs that are definitely incorrect. It does not require that the program is correct.

That's a big difference.

ChadNauseam 26 minutes ago | parent [-]

there’s a miscommunication. programs that pass the borrow checker all are memory safe (assuming code marked unsafe is sound). This means that all memory unsafe programs are excluded. but some memory-safe programs are excluded too.

drivebyhooting 5 hours ago | parent | prev [-]

Come on that’s not true. How would you write and LRU cache in rust? It’s not possible in idiomatic rust. You either need to use unsafe or use integer indices as a poor man’s pointer.

mattgreenrocks 5 hours ago | parent | next [-]

Indices are fine. Fixating on the “right” shape of the solution is your hang-up here. Different languages want different things. Fighting them never ends well.

ycombinatrix 5 hours ago | parent | prev [-]

What's wrong with integer indices? They have bounds checking. You definitely do not need unsafe to do LRU.

5 hours ago | parent | prev [-]
[deleted]