Code as data beyond Lisp (but Lisp, too)

preview_player
Показать описание
Demos include C# (w/ LINQ), Python, Scheme, and Julia.

Links:

0:00 - C# and intro
1:26 - Python
2:16 - C# again
5:51 - Python again
11:21 - Lisp and Scheme
13:42 - Julia
Рекомендации по теме
Комментарии
Автор

When he Ctrl+Tabs to the last tab so you know the video is ending soon :(

DazzlePirate
Автор

In the Haskell ecosystem there are several approaches:
- You can put your 'code' in a free monad, which is essentially a fancy embedded DSL. This has nice properties, but has the disadvantage that some of it is opaque to introspection.
- You can use Template Haskell. This is more in line with lisp style quoting and macros, but uglier.

computationaltrinitarianism
Автор

Great and clear explanation for Homoiconicity and "code as data". Thanks for this!

TheGRoques
Автор

How can I step forward to use these methods of manipulations of ASTs in for example Python to then compile it to something like C++ or Java?

dmitryponyatov