|
|
|
|
|
by gf000
20 days ago
|
|
Well, then ad absurdum it would be easier to just output a bunch of 0s and 1s, right? The same goes for "just a list of nested lists", sure it is easy to produce it, and for trivial examples it may actually be easy, but for more complex and realistic problems lack of "higher order" structure is a negative! For something like JavaScript, you can just have a language-native AST object with a few helper functions and then can just call "addFunction" on it with proper arguments so that the API shape validates plenty of properties of your output. |
|
Or maybe I've just been sleeping on the power of Javascript AST.