I've come up with some better reasons to return nil.
- smaller generated code size
- cleaner implementation
of which the latter is the most significant.
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
I can see this tripping people up time and time again.
"Make it correct, then make it fast"
A wonderful asset of Clojure, is that once it's correct, the fast version is
never far away syntactically.
I think we should adopt this ideology and default to :seq matching.
To make it fast, just add :vector (or matchv).
Thanks,
Ambrose
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en