4 ms·
Ok I think I was unfair to Rust in my top message. "Creating problems of their own" was not accurate, but I am under the impression I would miss some D things i
by p0nce 13y ago
Ok I think I was unfair to Rust in my top message. "Creating problems of their own" was not accurate, but I am under the impression I would miss some D things if using Rust.
> Note that 80% of the compilation time in rustc is actually in LLVM passes (the same used by clang), which are mostly optimizations.
OK I had a flawed perception probably because of this.
> That said, I think there is a strong argument to be made that for many classes of programs it is worth some pain to eliminate memory safety problems
I agree 100%, especially on teams memory safety become incredibly important, also I have to thank you for fixing C integer promotion which I've seen create many bugs.
> It'd be helpful to know exactly what limitations you were hitting.
Trying to implement a "small vector" structure is my "hello world" program to get to know a language, and Rust implementations of it uses macros.
https://github.com/bjz/cgmath-rs/blob/master/src/cgmath/vector.rs https://github.com/bjz/cgmath-rs/blob/master/src/cgmath/vect...
https://github.com/sebcrozet/nalgebra/blob/master/src/structs/vec.rs https://github.com/sebcrozet/nalgebra/blob/master/src/struct...
Maybe not crazy difficult once fluent in Rust, but a bit scary for the beginner.
Finally, I like ad-hoc templates so it's a bit hard for me to get out of this mindset, which might not be the best like you said.
- pcwalton 13y agoAh, OK. From a glance I think some combination of higher-kinded type parameters, functional dependencies/associated types, and associated constants could fix the issues you were hitting that forced you to use macros. But I'll talk to bjz. Thanks for the pointers!