2 ms·
You need a different counterexample. Arc' programs have more nodes than Arc programs. In Arc, parens only define the structure of the parse tree. They carry
by brlewis 19y ago
You need a different counterexample. Arc' programs have more nodes than Arc programs.
In Arc, parens only define the structure of the parse tree. They carry no additional information. In Arc' the compiler's behavior must change based on the type of paren. You need an additional node of information for each paren pair to know its type. Thus Arc' programs are substantially longer when measured by nodes.
- dfranke 19y agoYou don't need additional nodes. The syntax of Arc' is still context-free. Paren types can be checked on-the-fly during parsing and never have to enter the AST.
- brlewis 19y agoLucky for Arc' programmers. They don't need to worry about paren types for expanded macros. OK, so you added complexity by making the reader more complex. I still think the evaluator has to be different for this to be a meaningful example.
- dfranke 19y agoWhat? Why would I want to introduce more differences? That the languages are so similar is the strength of the argument. Identical concision, different power, QED.
- brlewis 19y agoI don't want more differences, just difference in a different place. You could have, for example, defined Arc'' as identical to Arc except gzip-compressed. Once you have a parse tree, Arc, Arc' and Arc'' are identical, but Arc'' is actually more concise. But that's useless, because nobody is saying conciseness and power are identical. Arc' is no more likely to educate anybody than Arc'' is.