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

It’s not just about parser throughput, it also helps with giving better error messages (because the compiler can make better sense of partially-broken syntax), which is something the Rust team cares a whole lot about.



I don't buy that.

Good error messages and robust error recovery for syntax errors are possible for almost any kind of language, even very weird ones, with today's modern parser technology. Just have a look at what for example Tree-Sitter does.

But the meat of good programming language error messages lies not in the syntax errors. It's in meaningful and informative semantic error messages. And these are almost completely independent of the language's syntax.


Tree-sitter became somewhat popular after rust reached 1.0, as far as I can tell.

I personally find rust syntax pretty neat. It's designed to be unambiguous to machines, but that also means it's unambiguous to humans. It has no () around tests, but it mandates {} because that prevents goto fail. It has the classic ML `;` as a separator, not terminator. It's a pragmatic blend of C++ (with generics, namespacing, and the C influence), and ML (expression based, easy to parse, let-binding and type inference).




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

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

Search: