Protocol library as alternative to refinements (Russell Leggett)

Benjamin (Inglor) Gruenbaum inglor at
Mon Oct 21 12:17:54 PDT 2013

Russell Leggett <russell.leggett at> wrote:

Very interesting.

>  // 4. use the default if available

what's "the default" in #4? The protocol's default? What's the behavior if
no matching method is found?

Also, can anyone explain why this solves the performance problem scoped
object extensions have? It still seems like it would have to check the
environment for protocols and then check the methods on all available
protocols and do type matching to the type of the method.

`Collections.extend(Array)` seems awfully similar to an array extensions,
how does the `::` operator resolve the need for expensive lookup, can you
explain that to me?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list