Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Reading 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.


Ok, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: