> It seem to me there should be some way to load a record at run time
> without breaking the immutability laws.    Once the dynamic data is
> loaded, the record becomes immutable and will never be changed
> again.

Actually, that's how records work and is exactly the behavior of the
initial (foo. nil nil), after which the record is loaded and
immutable. If the loaded data must be bound to MyFoo:

(def MyFoo (foo. (load-data-from-file f1) (load-data-from-file f2)))

or you might consider making Myfoo a ref instead of each subrecords,
seems simpler that way.

-- 
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

Reply via email to