> Another reason I love Rust. It’s very statically analyzable.
Proc-macro in Rust is very tricky to analyze statically, some are even impossible (due to non-deterministic behavior)
Proc-macro in Rust is very tricky to analyze statically, some are even impossible (due to non-deterministic behavior)
One way to look at this is that partial evaluation of Rust or Scheme macros is very tractable, because there are very few side effects / side channels. But if you have a lack of hygiene or the C preprocessor, it's very difficult and almost everything becomes a "stuck term" whose evaluation is contingent on earlier evaluation.
Because of procedural macro, it becomes practically impossible to find all occurrences or rename a particular symbol regardless of the #ifdef or #[cfg] or whatever.
I am not sure whether Rust procedural macros are always that hygienic, so fair point if they aren't.