零零乙 2010-06-17 20:59 采纳率: 33.3%
浏览 188
已采纳

宏(用户定义的代码转换)的概念是什么时候出现的?

I have read McCarthy's 1960 paper on LISP and found no reference to anything that's similar to user-defined macros or normal order evaluation. I was wondering when macros first appeared in programming language history (and also in Lisp history):

  • When was the idea of user-defined code transformation (before interpretation or compilation) first described (theoretically)?
  • What was the first programming language implementation to have Lisp-like macros (by "Lisp-like" I mean "using a readable Turing-complete language to do code-transformation")? (including non-Lisps -- Forth for example is quite old, but I'm not sure if the first Forth implementation already had "IMMEDIATE")
  • Also which of those was the first high-level programming language (exclude assembler languages...)
  • What was the first Lisp dialect to have macros?

Thank you!

转载于:https://stackoverflow.com/questions/3065606/when-did-the-idea-of-macros-user-defined-code-transformation-appear

  • 写回答

3条回答 默认 最新

  • larry*wei 2010-06-18 08:36
    关注

    From The Evolution of Lisp (Steele/Gabriel):

    3.3 Macros

    Macros appear to have been introduced into Lisp by Timothy P. Hart in 1963 in a short MIT AI Memo [Hart, 1963],

    Timothy P. Hart, MACRO Definitions for LISP, October 1963

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?