4 ms·
The regex crate in Rust works perfectly well on stable, AFAIK. The author has improved the runtime-constructed regexes to be much faster, while those same impro
by dikaiosune 10y ago
The regex crate in Rust works perfectly well on stable, AFAIK. The author has improved the runtime-constructed regexes to be much faster, while those same improvements haven't yet made it to the compile-time macro-constructed regexes. So, to get the most speed, one gives up having a hard compiler error when using an invalid regex literal. That said, the clippy tool (https://github.com/Manishearth/rust-clippy https://github.com/Manishearth/rust-clippy) can do compile-time verification of regex literals, but it depends on nightly Rust because it relies on deep integration with unstable compiler internals. (The regex crate also has a new optional nightly-only SIMD-accelerated algorithm, but it's otherwise fully functional on stable.)
Re: nightly features, I agree that there are several things which Rust really needs to stabilize to achieve many of its goals (stable SIMD, inline assembly, procedural macros, stable custom allocator support, the Rust Language Server for IDE integration, etc etc etc). Now that the major compiler internals refactoring of the last year is nearly complete, my understanding is that we may start to see more aggressive progress on some of those items which keep pushing users to nightly Rust.
- pjmlp 10y agoThe issue being that most customers won't agree using tools that aren't stable and having libraries that keep on depending on nightly doesn't bring any confidence to those businesses.
- dikaiosune 10y agoAbsolutely, I just wanted to clarify that the regex library isn't really one of those cases. And I haven't personally used a compile-time validator for regex literals in another language, so I'm not sure that missing clippy should be seen as a major gap in the tooling (although it does have many other useful checks). I certainly think there are other cases (serde immediately comes to mind) where the best developer experience can only be had on nightly, and that's a big problem for wider Rust adoption.