3 ms·
You can't reason about macros, that's not how they work. You can read their definition, you can expand them, but there's no way to look at a macro call and rea
by samatman 2y ago
You can't reason about macros, that's not how they work.
You can read their definition, you can expand them, but there's no way to look at a macro call and reason about it, it can do anything at all. In C you don't even know what is and isn't a macro, so Rust has a modest edge in that respect.
Zig just doesn't have this problem to begin with.
- creata 2y agoReading a macro's definition and reasoning about its effect is... reasoning. It's not the same as reasoning about something using its inherent limitations, which is the kind of reasoning that I think you're referring to, but it's still reasoning.
- samatman 2y agoOk, sure, we can reason about anything. We could reason about machine code, if we had the time and inclination. I barely participate in Hacker News anymore because it seems to have collectively lost the ability to extract meaning from words, unless an exhausting and totally excessive amount of attention is put into satisfying a misplaced sense of precision. There's no intellectual charity left and it sucks.
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]