Hacker News new | past | comments | ask | show | jobs | submit login

Sure, we're all in agreement that C and C++ (and probably some other semi-colon languages) make the wrong choice here.

In Godbolt I see "missing closing `)` after `if (a < b`" from D which unlike the Rust error doesn't acknowledge the user's intent and instead is talking about grammar. Hopefully the user will go read the documentation and find out that nope, you can't do that in D, because if they just adjust their code to silence the errors then they end up with ((a < b) < c) and that does... not do what they intended.




D does it with a grammar rule, not by looking for the case after the AST is constructed. It simply won't parse. Hence the origin of that error message.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: