On Mon, Oct 10, 2011 at 09:24:09PM -0400, David Nolen wrote:
> 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.

Sorry, I was unclear. I was trying to say that having two versions,
match-debug that throws exceptions, and match-normal that returns nil, is
redundant - default behavior is easily set with an :else clause. Changing
the behavior for something marked '-debug' seems like a bad idea as well.

I personally think throwing exceptions is the Right Thing. When adding
clauses incrementally, I'd rather get a direct error message for unexpected
values. Exhaustive clauses are a good thing, and :else nil is a simple
idiom for the 'other behavior'.


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

(Where are these arguments? I thought I remember a wiki with design notes,
but can't seem to find it). I don't see how it's two different cases. 
Having match take a vector of expressions with 'pattern rows' seems like an
unnecessarily visible optimization.


Steve

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