I think whether a general-purpose language should discourage or prevent unclear thinking is an open question. I don't think I've seen an example of a language doing so without being somehow crippled, and that's a Bad Thing.
I think whether a general-purpose language should discourage or prevent unclear thinking is an open question. I don't think I've seen an example of a language doing so without being somehow crippled, and that's a Bad Thing.
Exactly. Which means that it must be tool friendly, hence LALR/LL(k). Unless you want to do all your refactoring yourself.
Obviously non-context-free grammars are a problem, but a GLR or PEG grammar is still perfectly refactorable.
You forget that refactoring an intuitive grammar to LALR involves totally mangling that grammar and making it more difficult for everyone.
If the language is expressed as a GLR or PEG grammar then tool makers have it easier I reckon - easier to understand grammar.
The way to really ensure it's easy for everyone is for the compiler write to provide some abstract yet intuitive representation of the underlying grammar.
It really isn't an either/or, it's a case of both at once, I think!
But this doesn't change his point (or mine): languages should be created that are easy to write parsers for, so that its easier to write good tools.
And I think this applies to the grammar too: ANTLR's .g files are a good grammar language because its easy to write tools for - hence AntlrWorks.
In my eyes a parser generator is the solution, if you want to trade efficiency for cross-language-portability. ANTLR is probably the best solution at this point, though the C backend is quite wierd.