From: Carl Taylor
Subject: :test #'something-specific
Date: 
Message-ID: <WUWzf.276162$qk4.89328@bgtnsc05-news.ops.worldnet.att.net>
Is there any advantage to adding a specific :test argument when it's not 
really needed? For example:

(delete-duplicates "ABBBBFFGEEEADCBACC" :test #'char=)
versus
(delete-duplicates "ABBBBFFGEEEADCBACC")

Carl Taylor 

From: Coby Beck
Subject: Re: :test #'something-specific
Date: 
Message-ID: <3KXzf.111335$km.59247@edtnps89>
"Carl Taylor" <··········@att.net> wrote in message 
···························@bgtnsc05-news.ops.worldnet.att.net...
> Is there any advantage to adding a specific :test argument when it's not 
> really needed? For example:
>
> (delete-duplicates "ABBBBFFGEEEADCBACC" :test #'char=)
> versus
> (delete-duplicates "ABBBBFFGEEEADCBACC")

I might count it as a disadvantage that it is unnecessary distraction to the 
reader.  Plus, there are five other keyword arguments that might get jealous 
of that special treatment!

-- 
Coby Beck
(remove #\Space "coby 101 @ bigpond . com")
From: Edi Weitz
Subject: Re: :test #'something-specific
Date: 
Message-ID: <ufynj64vv.fsf@agharta.de>
On Fri, 20 Jan 2006 01:19:50 GMT, "Carl Taylor" <··········@att.net> wrote:

> Is there any advantage to adding a specific :test argument when it's
> not really needed? For example:
>
> (delete-duplicates "ABBBBFFGEEEADCBACC" :test #'char=)
> versus
> (delete-duplicates "ABBBBFFGEEEADCBACC")

It might be a tad more efficient.  Not that it matters much in your
example above... :)

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Peter Seibel
Subject: Re: :test #'something-specific
Date: 
Message-ID: <m2r770b28c.fsf@gigamonkeys.com>
"Carl Taylor" <··········@att.net> writes:

> Is there any advantage to adding a specific :test argument when it's
> not really needed? For example:
>
> (delete-duplicates "ABBBBFFGEEEADCBACC" :test #'char=)
> versus
> (delete-duplicates "ABBBBFFGEEEADCBACC")

Well, if this was, as it presumably would be:

  (delete-duplicates some-var :test #'char=)

vs 

  (delete-duplicates some-var)

The former will error if any of the elements of the sequence are not
characters. Which might be considered a feature if you want to detect
the type error earlier and a bug if you want this call to be more
forgiving.

-Peter


-- 
Peter Seibel           * ·····@gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp  * http://www.gigamonkeys.com/book/