Re: Modeling question multimethods or methodmaps?

2009-09-18 Thread Stuart Sierra
On Sep 17, 4:02 pm, Philipp Meier phme...@gmail.com wrote: Not your question, I know, but the Restlet framework for Java does exactly this. I know ;-) And it's using object oriented inheritance. In common lisp I'd use CLOS and an object hierachy but in clojure I'm unsure. I just use

Re: Modeling question multimethods or methodmaps?

2009-09-18 Thread James Reeves
On Sep 17, 12:50 pm, Philipp Meier phme...@gmail.com wrote: Which way would you prefer? What are to advantaces and drawbacks of each? The method-map approach seams more fp to me, but, I think that's like how multimethods are impemented, aren't they? I've actually been considering factoring

Modeling question multimethods or methodmaps?

2009-09-17 Thread Philipp Meier
Hi, I'm building a REST server library on top of compojure loosely modeled after the ideas of erlangs webmachine. The idea is to describe a resource using a couple of function which server as decision makers for the different stages of HTTP request processing. There will be a function to

Re: Modeling question multimethods or methodmaps?

2009-09-17 Thread Stuart Sierra
On Sep 17, 7:50 am, Philipp Meier phme...@gmail.com wrote: I'm building a REST server library on top of compojure loosely modeled after the ideas of erlangs webmachine. The idea is to describe a resource using a couple of function which server as decision makers for the different stages of

Re: Modeling question multimethods or methodmaps?

2009-09-17 Thread Philipp Meier
On 17 Sep., 17:49, Stuart Sierra the.stuart.sie...@gmail.com wrote: On Sep 17, 7:50 am, Philipp Meier phme...@gmail.com wrote: I'm building a REST server library on top of compojure loosely modeled after the ideas of erlangs webmachine. The idea is to describe a resource using a couple

Re: Modeling question multimethods or methodmaps?

2009-09-17 Thread David Nolen
I believe maps containing functions are generally looked down upon. Multimethods are probably the way to go. Can't you tag your request map with a type? On Thu, Sep 17, 2009 at 7:50 AM, Philipp Meier phme...@gmail.com wrote: Hi, I'm building a REST server library on top of compojure loosely

Re: Modeling question multimethods or methodmaps?

2009-09-17 Thread atucker
Yes Rich Hickey advises against it here... http://groups.google.com/group/clojure/browse_frm/thread/9eaf7be6a65e70df# On Sep 17, 9:26 pm, David Nolen dnolen.li...@gmail.com wrote: I believe maps containing functions are generally looked down upon. Multimethods are probably the way to go. Can't