We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
gensym
Jump to navigation
Jump to search
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
gensym is the traditional name for a compiler routine which generates fresh symbols. It originated in Lisp metaprogramming.
Functionality
At its most basic, a gensym produces an integer which it has never produced before. Commonly, gensyms will produce strings instead. Many gensyms allow an optional string parameter which will be included in the produced string.
Languages
The following languages have a builtin gensym:
- Common Lisp:
(gensym) - META II:
*1 - Prolog:
gensym/2