I can think of 'defvar that comes close to what you're about : it does not rebind the root value if it is different from nil
(though it doesn't warn you about the problem, it's more to prevent reinitializing vars when their containing files are reloaded) 2009/10/2 Mark <mjt0...@gmail.com> > > Is there a way to make a declaration in Clojure that cannot be rebound > later? Ideally, I'd like something that fails if I try to do this: > > (def myname "mark") > ; ...more code, elided... > (def myname "Mark") > > Perhaps this is obvious, but I see a lot of discussion of immutable > data structures, but I can't find a way to prevent my bindings from > changing. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---