On Fri, Oct 21, 2011 at 4:02 PM, Mark Engelberg <mark.engelb...@gmail.com>wrote:

> On Fri, Oct 21, 2011 at 12:41 PM, David Nolen <dnolen.li...@gmail.com>
> wrote:
> > Just because we have dynamic types does not give us the freedom to not
> > consider them.
>
> Oh, I definitely considered the types when I wrote the function.  It's
> just that at the time I wrote it, I was confident the input would
> already be seq-ified.  nil, among its many purposes, is a key part of
> the "seq interface", and testing for nil is how you are expected to
> interact with seqs to determine emptiness.  As my program grew, the
> assumption that the input would definitely be a seq was invalidated.
> This is exactly the inherent challenge of making evolving,
> maintainable programs that Rich speaks of in his video.


Testing for nil is not how you determine emptiness unless locally you are
using next.

(rest '()) -> ()
(next '()) -> nil

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

Reply via email to