$30 off During Our Annual Pro Sale. View Details »

Clojure's main rudiment: Macros - Construindo a fundação

Clojure's main rudiment: Macros - Construindo a fundação

Uma visão abrangente e conceitual sobre Macros em Clojure.

Tomás Augusto Müller

August 06, 2016
Tweet

Transcript

  1. Clojure's main
    rudiment: Macros
    Construindo a fundação

    View Slide

  2. “O código são dados!”

    View Slide

  3. “O código são dados!”

    View Slide

  4. View Slide

  5. Hands-on 1/3

    View Slide

  6. Sistema de avaliação em linguagens não-Lisp
    Fonte: Brave Clojure

    View Slide

  7. List’s -> Tree’s
    Fonte: Brave Clojure

    View Slide

  8. Sistema de avaliação em Clojure
    Fonte: Brave Clojure

    View Slide

  9. Recapitulando!
    • Reader
    • Reader Macros
    • (hands-on 2/3)
    • Evaluator
    • Symbols
    • Special-forms

    View Slide

  10. Clojure Macros

    View Slide

  11. Sistema de avaliação em Clojure
    Fonte: Brave Clojure

    View Slide

  12. Hands-on 3/3

    View Slide

  13. –Rich Hickey
    (http://codequarterly.com/2011/rich-hickey/)
    “You can reach a point with Lisp where,
    between the conceptual simplicity, the large
    libraries, and the customization of macros, you
    are able to write only code that matters. And,
    once there, you are able to achieve a very high
    degree of focus, such as you would when
    playing Go, or playing a musical instrument, or
    meditating. And then, as with those activities,
    there can be a feeling of elation that
    accompanies that mental state of focus.”

    View Slide