3 ms·
Wow this is so neat. Has anyone had any experience with it / feedback? This looks so much nicer than existing macros.
by vlovich123 2y ago
Wow this is so neat. Has anyone had any experience with it / feedback? This looks so much nicer than existing macros.
- weinzierl 2y agoNo experience. I agree that it looks nice and useful, but I don't think it is much like Zig's comptime.
- nindalf 2y agoThe author announced a previous version of this crate a couple of weeks ago and this new version two days ago. So there might not be that many users. That said I did replace a declarative macro with it. Supposedly I wrote the declarative macro according to git blame but I only have a vague idea how it works. I replaced it with crabtime and I got something that I can understand and maintain. Overall I’d say I’m very pleased with crabtime. Previously I would have avoided Rust metaprogramming as much as possible, but now I’d feel confident to use it where appropriate.
- Ygg2 2y agoIt's neat, but I don't think it does the same as Zig's comptime. For one it doesn't have Zig's dynamic behavior, nor more practically compile time reflection. Rust can't have Zig's comptime dynamic properties, same way Zig will never have Rust's compile time guarantees*. You can't simultaneously have your dynamic cake and eat it at compile time. * Theoretically you can have it, but it would require changing language to such extent it's not recognizable.