On Thu, Jan 29, 2009 at 5:03 PM, Mark Engelberg
<mark.engelb...@gmail.com> wrote:
>
> On Thu, Jan 29, 2009 at 2:52 PM, Mark Volkmann
> <r.mark.volkm...@gmail.com> wrote:
>>> What is the drawback of the (some #{:y} [:x :y :z]) idiom?  Is it too
>>> verbose?  Too slow?  Too flexible?  Too good a re-use of existing
>>> functionality?  Too helpful in opening ones eyes to the possibilities
>>> of sets and higher order functions?
>>
>> I vote for too verbose. ;-)
>
> (some #{:y] [:x :y :z]) is fewer characters than
> (includes? :y [:x :y :z]) so your vote of "too verbose" is hard to justify.

Good point. I was thinking more in terms of number of "noise"
characters instead of number of total characters. Looking at it that
way it's
(${}[])
versus
([])

The current form requires you to think a little more. You're thinking
"I want to see if this thing is one of several possible values.
So I want to compare one thing to a set of things.
How do I do that?
Oh, I have to put the one thing in a set and the set of things in a vector."

That's easy to remember if you code in Clojure daily, but not so easy
if you only code in Clojure once every two weeks and code in Java or
something else the rest of the time.

-- 
R. Mark Volkmann
Object Computing, Inc.

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