3 ms·
Go is one of the last languages I'd think about when considering access to the AST. The first would be Lisp.
by Zambyte 1y ago
Go is one of the last languages I'd think about when considering access to the AST. The first would be Lisp.
- tonymet 1y agothere are tons of utilities. and the fact that i've written some means it's pretty easy
- Zambyte 1y agoRight, I'm not saying it's impossible in Go, but it's so easy in Lisp you're bound to do it even by accident. There are no "AST utilities" in Lisp because the AST is just a normal list / tree of primitive values (of the `symbol` type). You operate on code structures with the same libraries that you operate on a list / tree of numbers, strings, etc. Code is data.