4 ms·
You could assemble an AST in a non-homoiconic language. This has some added complexity over something like Lisp to be sure, but it doesn't have most of the dow
by dllthomas 12y ago
You could assemble an AST in a non-homoiconic language. This has some added complexity over something like Lisp to be sure, but it doesn't have most of the downsides of concatenating strings.
- icebraining 12y agoYeap. An example in Python: http://eli.thegreenplace.net/2009/11/28/python-internals-working-with-python-asts/ http://eli.thegreenplace.net/2009/11/28/python-internals-wor...
- dllthomas 12y agoVery nice. Template Haskell takes a similar approach, though is (usually) not run-time.