Re:Facebook is using D in production starting today
by pcwalton on Saturday October 12, 2013 @11:29AM
(#6539032)
Ah, 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!
> 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/vect... 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.