Having a map leads to pretty bad syntax for what I'm trying to do. That's why I 
want to metaprogram here.  

I want this ...

(post/all api-key)

… instead of this ...

((post/api :all) api-key)

Why can an ns not be passed around like anything else?

David  


On Thursday, October 11, 2012 at 9:18 PM, Alan Malloy wrote:

>  
>  
> On Thursday, October 11, 2012 9:03:38 PM UTC-7, David Jacobs wrote:
> > I would like to create function names programmatically. So far, I have code 
> > that works:  
> > ...
> > Where am I going wrong?
> >  
> > David
>  
> Sentence one. Don't do it that way: namespaces are not very good hashmaps, 
> but hashmaps are excellent at that. You already have the data that you need 
> to make this handler, and there's no need to scatter it into dozens of 
> functions: use that data to create a single function that does the 
> dispatching logic that you need, and put that into your ring routes or 
> whatever.
> --  
> 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 
> (mailto: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 
> (mailto: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 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