> I've seen a couple instances where people used a couple levels of
> protocols (e.g., one function dispatching on the type of the first argument
> in turn calling something that dispatches on the second argument) in order
> to get some additional speed with multiple dispatch on type, but I ha
I don't think there is currently a way to do this that is simultaneously:
1) Generic (dispatches on the type of all arguments)
2) Extensible (can be extended to new types at runtime)
3) Fast (about as fast as JVM dispatch allows)
Protocols give you 2) and 3). Multimethods give you 1) and 2). Custo
Multiple vs single dispatch, hmm. You can always use a case statement too.
On Sat, Aug 3, 2013 at 11:56 PM, Mark Engelberg wrote:
> The word "fast" is relative, of course. I've been happily using Clojure's
> multimethods for a long time. They are certainly fast enough for a wide
> range of use
The word "fast" is relative, of course. I've been happily using Clojure's
multimethods for a long time. They are certainly fast enough for a wide
range of uses.
I've seen a couple instances where people used a couple levels of protocols
(e.g., one function dispatching on the type of the first ar
Razvan, are you asking about dispatch on multiple types... protocols only
give fast dispatch on their first arg's type.
Currently you can either get fast dispatch on the type of the first arg, or
you get slower dispatch on anything w/ multimethods.
On Sat, Aug 3, 2013 at 11:48 PM, Robert Levy w
But isn't that the whole point of protocols, polymorphic dispatch that is
fast?
On Sat, Aug 3, 2013 at 11:45 PM, Răzvan Rotaru wrote:
> The keyword here is speed. Multimethods are not fast. They don't use the
> JVM for dispatch (as far as I know). Protocols are fast. That's the reason
> for thei
The keyword here is speed. Multimethods are not fast. They don't use the
JVM for dispatch (as far as I know). Protocols are fast. That's the reason
for their existence. I want to find out whether there's some effort
invested in making fast multiple dispatch in Clojure (and how else can it
be bu
Oh wait nm, misread completely. The solution exists and it's called
protocols.
On Sat, Aug 3, 2013 at 11:37 AM, Robert Levy wrote:
> Sounds like he wants predicate dispatch? That was an early motivation for
> core.logic and as far as I know it's in the works.
>
>
> On Sat, Aug 3, 2013 at 4:22 A
Sounds like he wants predicate dispatch? That was an early motivation for
core.logic and as far as I know it's in the works.
On Sat, Aug 3, 2013 at 4:22 AM, Răzvan Rotaru wrote:
> Hi,
>
> I'm looking for fast lisp style generic functions in clojure. In other
> words: multimethods that dispatch o
I can't understand why multi methods or protocols do not
satisfy your needs. Care to shed some light on your needs ?
Luc P.
> Hi,
> > I'm looking for fast lisp style generic functions in clojure. In other
> words: multimethods that dispatch on the java type.
> A search on the web revealed littl
What's wrong with the built-in multimethods?
--
--
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
11 matches
Mail list logo