Lisp uses the string representation of AST as its syntax.
The good thing derived from this is: you have the whole AST available for massage, to transform it to whatever form. That's exactly what a control statement does.
But in languages like C, you cannot easily have the AST ready for the exact corresponding code you're writing now, which means it's hard, though not impossible , to transform or operate the AST using the code you are writing now. One might argue he does not need new control statement, but the ability to add new control statement matters for expressiveness and ease of generating DSLs.
没有评论:
发表评论