Also, if you have so many atoms in your program that it becomes hard to remember where they are, that would be another source of concern ;-)
On Sat, Dec 5, 2015 at 4:44 PM, James Reeves <ja...@booleanknot.com> wrote: > Why should they have any sort of naming scheme? Dynamic vars are unusual > because their values can change. Atoms and refs remain the same, and even > though inside their values mutate, they don't affect the outer var. > > - James > > On 5 December 2015 at 21:39, Mars0i <marsh...@logical.net> wrote: > >> Does anyone want to suggest or promote a naming convention for atoms, >> refs, and agents, i.e. some of things that you can dereference with @ i.e. >> deref? >> >> (Also, what about futures, delays, and promises? I think of these as >> playing a different sort of role, even though deref works with them, too.) >> >> The Clojure style guide >> <https://github.com/bbatsov/clojure-style-guide#naming> says: >> >> Use *earmuffs* for things intended for rebinding (ie. are dynamic). >> >> ;; good >> (def ^:dynamic *a* 10) >> >> >> It could be reasonable to use earmuffs for atoms, etc., too, but I think >> that "@*my-atom*" is ugly because of the juxtaposed @-sign and asterisk, >> and in any event I think of rebinding as a different kind of thing from >> what happens with atoms/refs/agents. >> >> -- >> 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. >> > > -- > 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. > -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- 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.