Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part 2: Getting real > More macros and DSLs

15. More macros and DSLs

This chapter covers

  • A review of Clojure macros

  • Anaphoric macros

  • Shifting computation to compile time

  • Macro generating macros

  • Domain-specific languages in Clojure


This final chapter is about what many consider the most powerful feature of Clojure. John McCarthy, the inventor of the Lisp programming language, once said that Lisp is a local maximum in the space of programming languages. Clojure macros make Clojure a programmable programming language because it can do arbitrary code transformations of Clojure code, using Clojure itself. No programming language outside the Lisp family can do this in such a simple way. To reiterate the obvious, this is possible because code is data.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial