Hacker News new | ask | show | jobs
by sarmad 3798 days ago
It's not my goal to make the system able to parse arbitrary existing languages. The parser can deal with ambiguity by branching parsing states, but despite that it still won't be easy to parse inherently ambiguous grammars, and even if that was easy to do I still would push against it as that would be in conflict with the language's goal of unifying different programming areas under one language with consistent syntax. It wouldn't be much useful language if your code is written like c++ in one place and like, say, Ruby or SQL in another. You need your code to be consistent and the language to be consistent as well, otherwise learning the language would be difficult and understanding the fragmented user code would also be difficult. The main benefit behind being able to parse existing languages is for porting existing code, but that can be done using external conversion tools.