Hacker News new | ask | show | jobs
by hu3 1913 days ago
I find Rust's borrow checker too clunky for exploratory work. It breaks my flow and imposes higher cognitive load. The slow compiler doesn't help either.
3 comments

That is fair. I have not done enough exploratory work in Rust to comment. Maybe there are abalysis patterns that can avoid bumping up against the borrow checker.
Yeah Rust is really close to what I want but I agree the borrow checker adds a bit too much overhead when dealing with data science.

It seems like reference counting is probably the move here

I tend to think the innately slow compiler is basically a fatal mistake. Rust will never be able to be used for large projects. It's not so obvious now because everything it's used for is tiny.
Hopefully some of the work out of cranelift, gccrs, and/or rust-analyzer can be used to speed up compilation.
Seriously one hopes. I think of projects in C++ that takes half an hour to compile, in rust they would take half a day or longer.
What supports that statement exactly? If you split your big projects into crates it would recompile pretty fast. C++ can also take ages to compile (eg. compiling Firefox from scratch). Keeping your code modular to get decent compile times seems like a win win.
I never compile C++ projects from scratch like I am forced to do with Rust.

The only code I compile from scratch in C++ is the code I write myself, everything else is available as binary libraries, something that cargo doesn't do, and it is not part of the near future roadmap, if ever.

Then, after compiled, most of the stuff lands on the VC++ metadata files, so incremental compilation and linking cuts even more time from the usual edit-compile-debug workflow.

Interesting, is this common on windows? On Linux I've never seen precompiled C++ libraries (at least not these with templates) back when I compiled stuff more often (read: back when I used gentoo). Do g++ and clang++ support precompiled libraries in the general case? I suppose C++ modules might make it more common anyway, but I don't see why rust couldn't do it if they ever prioritize it.