1. 13

  2. 4

    In the case of Clojure, add perform some work at compile time to the list.

    e.g op’s time macro can be made to compile itself out of a production artifact (and I don’t mean disable, I mean gone).

    1. 4

      I had a discussion with someone about this article on mastodon the other day, they were unhappy with the article (although I can’t have claimed to read it) because apparently it missed the point that the fact that homoiconicity does not mean that the source code represents the AST, but rather the AST is built from the source code is built using the same structures that you have access to in the language. Examples of homoiconic languages that are lisps, but do not have lisp’s syntax, include M-Expressions and Dylan. It is worth noting that Prolog, is also homoiconic, although not a lisp.

      The c2 wiki’s page on homoiconicity is good for examples

      1. 1

        Elixir also has support for that (to use some “more modern” languages).

      2. 3

        To extend the language control structures (loops, match), to embed a different computing paradigm other than recursion theory (hello FSA), to make a DSL (maybe not that of a good idea), to generate code using the same programming language.

        1. 1

          to embed a different computing paradigm other than recursion theory (hello FSA)

          Do you know of any available examples of this?

          1. 2

            I read it here and it was very interesting, you can do at a type level but it requires a lot of thinking while this is very streamlined. Another interesting take I havent read yet is the virtual machine section of SICP.

            1. 1

              Thank you. For anyone wanting to read the paper, I found it available on the author’s site. [1]

              [1] https://cs.brown.edu/~sk/Publications/Papers/Published/sk-automata-macros/paper.pdf