4 ms·
Yes. From what I understand, Rust's macros/generics are not Turing complete.
by tines 7y ago
Yes. From what I understand, Rust's macros/generics are not Turing complete.
- steveklabnik 7y agoThey are. Procedural macros especially are a function that takes tokens and returns tokens, and have the full language at their disposal.
- tines 7y agoAh interesting. But I imagine that token-based macros don't give you access to the types in the program being compiled do they? i.e. a c++ template can tell when two types are the same but a token level macro wouldn't be able to do that I think.
- steveklabnik 7y agoCorrect.