Issue 34 ( http://code.google.com/p/clojure-contrib/issues/detail?id=34 )
created with patch (both -?> and .?.  defined in clojure.contrib.core,  with
unit tests in clojure.contrib.core.tests

-- 
Laurent

3/13 Laurent PETIT <laurent.pe...@gmail.com>

> OK, so I think the consensus is on the names .?. and -?> . No problem with
> me.
>
> I'm willing to write the patch, but which patch ? I mean, do these macros
> deserve their own file (maybe not) ?
> Maybe adding them to the existing clojure.contrib.macros ?
> Or else, I was thinking about creating a new file named
> clojure.contrib.core since these are slight variants of existing core
> functions ?
>
> 2009/3/13 Stephen C. Gilardi <squee...@mac.com>
>
>
>> On Mar 12, 2009, at 9:45 PM, Mark Volkmann wrote:
>>
>>>
>>> On Thu, Mar 12, 2009 at 5:04 PM, Stephen C. Gilardi <squee...@mac.com>
>>> wrote:
>>>
>>>>
>>>> I like these:
>>>>
>>>>       .?.
>>>>       -?>
>>>>
>>>
>>  Given a choice between the two, I'd choose -?>
>>>
>>
>> The proposal was for naming "nil-safe" versions of the existing .. and ->
>> functions.
>>
>> (-> nil (. toString)) ==> NullPointerException
>>
>> (-?> nil (. toString)) ==> nil
>>
>>
>> (.. nil (toString)) ==> NullPointerException
>>
>> (.?. nil (toString)) ==> nil
>>
>>
>> Note: these are just simple examples. The point isn't the one argument,
>> literal nil case, but the case where many operations are "chained" or
>> "threaded" and at each point the propagated result may be nil.
>>
>> --Steve
>>
>>
>
>
>

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