You are right about the factory methods for Records.  My need to reference the 
records in another namespace was for type hinting.


> On Nov 5, 2014, at 6:12 PM, Gary Trakhman <gary.trakh...@gmail.com> wrote:
> 
> You don't need to import the record if you use the auto-gen'd factories, 
> ->RecordName and map->RecordName.  You can and also shouldn't import the java 
> interfaces created by protocols.  
> 
> It's possible to interactively develop this way, but you really have to know 
> what's being eval'd and what types are invalidated to do so, and is generally 
> not recommended.
> 
> Extend-type is easier to use interactively than inline protocol extensions 
> (which are faster) as it's modifying dynamic globals.
> 
> On Wed, Nov 5, 2014 at 6:03 PM, Adam Krieg <adammkr...@gmail.com 
> <mailto:adammkr...@gmail.com>> wrote:
> My experience with protocols is that the implementations can't be redefined, 
> e.g changing an implementation.  So if you change one of the applied 
> protocols, you may need to restart your REPL. YMMV.
> 
> Using records outside of their declared namespace is also really weird.  You 
> need to both require the namespace and import the record IN THAT ORDER. If 
> you import the Record and then require the namespace, it doesn't work, which 
> is a nasty wart, IMO.
> 
> 
> On Sunday, October 26, 2014 11:48:29 AM UTC-4, Daniel Higginbotham wrote:
> What's difficult when it comes to understanding multimethods, records, types, 
> and protocols? I'm writing a chapter on multimethods, records, types, and 
> protocols for the book Clojure for the Brave and True, and I'd love to hear 
> about what kinds of pitfalls I should be sure to cover :)
> 
> Thanks!
> Daniel
> 

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

Reply via email to