fbpx
维基百科

卫生宏

卫生宏(英語:hygienic macro),又称干净宏,是指其扩展保证不会导致意外捕获标识符的Scheme[1]Dylan[2]Rust[3]NimJulia编程语言都有这一特性。在引入卫生宏之前,Lisp社区有众所周知的意外捕获的问题。宏编写者会使用产生唯一标识符的语言特性(如gensym)或使用混淆的标识符来避免这一问题。卫生宏是对捕获问题的一种程序化解决方案,集成在宏扩展器本身中。「卫生」这一术语是在Kohlbecker等人1986年的论文中创造的,灵感来自数学中使用的术语。[4]

参考文献 编辑

  1. ^ schemers.org: Documents: Standards: R5RS. schemers.org. [2022-08-19]. (原始内容于2022-08-11). 
  2. ^ Barrett, Kim; Cassels, Bob; Haahr, Paul; Moon, David A.; Playford, Keith; Withington, P. Tucker. A monotonic superclass linearization for Dylan. Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications - OOPSLA '96 (New York, New York, USA: ACM Press). 1996. doi:10.1145/236337.236343. 
  3. ^ Macros and metaprogramming - Rust for the Polyglot Programmer. www.chiark.greenend.org.uk. [2022-08-19]. (原始内容于2021-10-06) (英语). 
  4. ^ Kohlbecker, E.; Friedman, D. P.; Felleisen, M.; Duba, B. Hygienic Macro Expansion (PDF). ACM conference on LISP and functional programming. 1986 [2022-08-19]. (原始内容 (PDF)于2017-08-29). 

卫生宏, 此條目可参照英語維基百科相應條目来扩充, 2022年8月19日, 若您熟悉来源语言和主题, 请协助参考外语维基百科扩充条目, 请勿直接提交机械翻译, 也不要翻译不可靠, 低品质内容, 依版权协议, 译文需在编辑摘要注明来源, 或于讨论页顶部标记, href, template, translated, page, html, title, template, translated, page, translated, page, 标签, 英語, hygienic, macro, 又称干净宏, 是指其扩展保. 此條目可参照英語維基百科相應條目来扩充 2022年8月19日 若您熟悉来源语言和主题 请协助参考外语维基百科扩充条目 请勿直接提交机械翻译 也不要翻译不可靠 低品质内容 依版权协议 译文需在编辑摘要注明来源 或于讨论页顶部标记 a href Template Translated page html title Template Translated page Translated page a 标签 卫生宏 英語 hygienic macro 又称干净宏 是指其扩展保证不会导致意外捕获标识符的宏 Scheme 1 Dylan 2 Rust 3 Nim和Julia等编程语言都有这一特性 在引入卫生宏之前 Lisp社区有众所周知的意外捕获的问题 宏编写者会使用产生唯一标识符的语言特性 如gensym 或使用混淆的标识符来避免这一问题 卫生宏是对捕获问题的一种程序化解决方案 集成在宏扩展器本身中 卫生 这一术语是在Kohlbecker等人1986年的论文中创造的 灵感来自数学中使用的术语 4 参考文献 编辑 schemers org Documents Standards R5RS schemers org 2022 08 19 原始内容存档于2022 08 11 Barrett Kim Cassels Bob Haahr Paul Moon David A Playford Keith Withington P Tucker A monotonic superclass linearization for Dylan Proceedings of the 11th ACM SIGPLAN conference on Object oriented programming systems languages and applications OOPSLA 96 New York New York USA ACM Press 1996 doi 10 1145 236337 236343 Macros and metaprogramming Rust for the Polyglot Programmer www chiark greenend org uk 2022 08 19 原始内容存档于2021 10 06 英语 Kohlbecker E Friedman D P Felleisen M Duba B Hygienic Macro Expansion PDF ACM conference on LISP and functional programming 1986 2022 08 19 原始内容存档 PDF 于2017 08 29 取自 https zh wikipedia org w index php title 卫生宏 amp oldid 76016284, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。