inline
On Saturday, February 15, 2014 12:41:52 AM UTC-5, Mars0i wrote:
>
> Could someone clarify for me why "some?" as a name for not nil makes sense 
> at all in the first place?  Not criticizing.  I just don't understand what 
> existence or there being some of something has to do with nil.  
>
> Maybe I don't understand the intent of nil.  I came to Clojure from Common 
> Lisp.  nil is a weird beast in CL, but it's also a weird beast in Clojure.
>
> Is the idea that nil is supposed to be an empty structure, and empty? and 
> seq are too general?  But unlike nil in Common Lisp, nil in Clojure is not 
> an empty structure, even though (empty? nil) is true.  [], (), (lazy-seq), 
> #{}, and {} are empty structures.  Am I misunderstanding?
>

I *think* the idea to name it *some* is since nil often means "no value" 
(as already said by puzzler). This is also how Scala and F# name it:
http://en.wikipedia.org/wiki/Option_type

And the (some-> ..) macro has existed for a while which works the same so I 
think it makes a lot of sense to call it some? instead of non-nil?.

HTH

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to