Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Generalizing -> & ->>
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Laurent PETIT  
View profile  
 More options Nov 13 2009, 1:27 am
From: Laurent PETIT <laurent.pe...@gmail.com>
Date: Fri, 13 Nov 2009 07:27:49 +0100
Local: Fri, Nov 13 2009 1:27 am
Subject: Re: Generalizing -> & ->>
Oh yes, thanks for refreshing my memory.
And indeed it makes sense to place the question mark in the "questioned" side :)

2009/11/13 Wilson MacGyver <wmacgy...@gmail.com>:

> Yes, it's groovy, and it's "?." It's called safe navigation operator

> http://groovy.codehaus.org/Operators#Operators-SafeNavigationOperator...

> On Thu, Nov 12, 2009 at 6:03 PM, Laurent PETIT <laurent.pe...@gmail.com> wrote:
>> 2009/11/3 Alex Osborne <a...@meshy.org>:

>>> Sean Devlin wrote:
>>>> This is slightly unrealted, but how does one pronounce ->, ->> and the
>>>> like?  Is this documented?

>>> The doc-strings usually give you a nice hint.  I usually use "thread"
>>> for -> and "thread last" for ->>.  The actual symbols I think of as
>>> "arrow" and "double arrow".

>>> Then -?> in contrib is "short-circuiting thread".  Not sure about the
>>> symbol, perhaps "questionable arrow"? ;-)

>> The question mark ? is there to "mimic" (somewhat) what one can find
>> in OO languages such as groovy (I think it's groovy, is it ?) :

>> someObject.?propA.?prop2

>> where .? will check if the object is null before trying to get a
>> property (or method) on it. If null : returns null, if not null,
>> returns the property etc.

>> Initially i wanted to name it ->? but the final ? is by convention
>> reserved for predicates, so Rich suggested -?> (and also .?. for the
>> .. equivalent).

>> --
>> 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+unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en

> --
> Omnem crede diem tibi diluxisse supremum.

> --
> 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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.