What's the convention for using an asterisk at the end of a function name in Clojure and other Lisp dialects?

后端 未结 4 699
轻奢々
轻奢々 2021-02-01 02:03

Note that I\'m not talking about ear muffs in symbol names, an issue that is discussed at Conventions, Style, and Usage for Clojure Constants? and How is the `*var-name*` naming

4条回答
  •  野的像风
    2021-02-01 03:05

    Mathematicians and Haskellers can use their apostrophes to indicate similar objects (values or functions). Similar but not quite the same. Objects that relate to each other. For instance, function foo could be a calculation in one manner, and foo' would do the same result but with a different approach. Perhaps it is unimaginative naming but it has roots in mathematics.

    Lisps generally (without any terminal reason) have discarded apostrophes in symbol names, and * kind of resembles an apostrophe. Clojure 1.3 will finally fix that by allowing apostrophes in names!

提交回复
热议问题