On Monday, November 7, 2016 at 6:33:49 PM UTC-6, Steven Yi wrote: > > Hi All, > > I wanted to understand whether '#' may be treated as a valid character > for symbols. The Clojure site [1] has: > > "Symbols begin with a non-numeric character and can contain > alphanumeric characters and *, +, !, -, _, ', and ? (other characters > may be allowed eventually)." >
The general advice here is that the characters listed here are guaranteed to be valid now and in the future. Characters not listed here may be accepted now or used within Clojure, but are not guaranteed to work in the future. > I realized I was using # today in a symbol without thinking much of > it. However, the syntax highlighting in Vim marked it oddly when it > was at the end of the symbol name versus in the middle of the name. > (The use case is denoting musical notes using lists of symbols, such > as '(c c# d eb) ). > Same as above - this works now, but is not guaranteed to always be valid. auto-gensyms also employ # as part of symbol names, but I do not know > if that should be considered a kind of special case. > Same as above - Clojure may use these symbols to mean special things (like auto gensyms in syntax quote), but that right is reserved for Clojure. > Any clarifications appreciated! > steven > > [1] - http://clojure.org/reference/reader > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.