Would supporting other data structures make it slower when using vectors, or 
only when using non-vector seq's?

If it makes it substantially slower across the board, personally I'd still like 
core.match to support all of clojure's built in data structures; but I could 
understand why people would have a contrary opinion.

If it only makes the non-vector seq case slower, I'd certainly make that an 
available option - people are going to have to manually convert other sequences 
into vectors anyway which creates a coding overhead and also makes the code 
less likely to be JITed.

On the other hand.. YMMV.

Thanks for all your hard work David, I love core.match.


R.


On 10 Oct 2011, at 15:14, David Nolen wrote:

> On Mon, Oct 10, 2011 at 3:46 AM, Ambrose Bonnaire-Sergeant 
> <abonnaireserge...@gmail.com> wrote:
> While we're on the topic of conventions, I think the most important 
> convention match is breaking
> is using the destructuring syntax to mean something less generic by default 
> (only vectors).
> 
> (match [(list 1 2 3)]  
>            [[x & xs]] 1)   ;; <- falls through because [x & xs] only matches 
> vectors by default
> 
>  We can support this but I'm afraid that it will be very slow. In the 
> presence of rest syntax vector patterns split the data structure into left 
> and right sides. But again, perhaps this is a case of user friendliness and 
> people don't care that much?
> 
> 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

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