gpt4 book ai didi

programming-languages - "The whole language always available"在 Clojure 的情况下是否成立?

转载 作者:太空宇宙 更新时间:2023-11-03 18:32:58 25 4
gpt4 key购买 nike

Paul Graham 的第九个要点 What Made Lisp Different说,

9. The whole language always available.

There is no real distinction between read-time, compile-time, and runtime. You can compile or run code while reading, read or run code while compiling, and read or compile code at runtime.

Running code at read-time lets users reprogram Lisp's syntax; running code at compile-time is the basis of macros; compiling at runtime is the basis of Lisp's use as an extension language in programs like Emacs; and reading at runtime enables programs to communicate using s-expressions, an idea recently reinvented as XML.

最后一个要点是否适用于 Clojure?

最佳答案

您可以在 Clojure 中自由混合运行时和编译时,尽管 Common Lisp 在这里仍然更加灵活(由于存在编译器宏和符号宏以及完全支持的 macrolet;Clojure 有通过语法引用中的自动符号解析来实现宏卫生的酷方法的一个优势)。阅读器目前已关闭,因此无法自由混合运行时、编译时读取时间1


1 除了通过不受支持的 clever hacks .

关于programming-languages - "The whole language always available"在 Clojure 的情况下是否成立?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3744780/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com