Examples of what Lisp's macros can be used for

后端 未结 8 921
自闭症患者
自闭症患者 2020-12-24 05:56

I\'ve heard that Lisp\'s macro system is very powerful. However, I find it difficult to find some practical examples of what they can be used for; things that would be diffi

8条回答
  •  独厮守ぢ
    2020-12-24 06:36

    With macros you can define your own syntax, thus you extend Lisp and make it
    suited for the programs you write.

    Check out the, very good, online book Practical Common Lisp, for practical examples.

    7. Macros: Standard Control Constructs
    8. Macros: Defining Your Own

提交回复
热议问题