On Mon, Oct 10, 2011 at 6:07 PM, Stephen Wrobleski <st...@localtoast.org>wrote:

> I think a match-debug is barking up the wrong tree. If throwing an
> exception
> is the right thing to do to track down an unaccounted case, why make a
> different macro just for a slightly different default behavior that is
> easily specifiable by :else.  In fact, the match macro can simply implement
> default behavior by "adding an :else clause if there is none" (thus
> removing
> concerns about 'code size').
>

I'm not following. Getting accurate information about what failed to match
needs to be integrated. Given that match makes no restrictions on types
there's not much we can do except communicate where we were when the match
failed via an exception.


> Also, what's the point of having a specific match and match-1? I presume
> it's to avoid creating an intermediate vector.  Why not make match-1 the
> default, and if the expression is a literal vector, fall back to current
> match?
>
> Steve
>

Ambrose had some arguments for keeping match and match-1 separate. At the
moment I don't see any real issues except that overloading match to handle
two different cases seems like we're making things slightly more complex.

David

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