You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Daniel Sun <re...@hotmail.com> on 2017/01/26 16:27:14 UTC

[VOTE]About the "implies" operator(=>) for Groovy 3

Hi all,

      The new parser(Parrot) supports "implies" operator(=>) now, e.g. 

// if and only if isDistributedTxFailed is true and isCompensated is false,
yields notConsistent.
if (isDistributedTxFailed => isCompensated) {
    println 'eventuallyConsistent '
} else {
    println 'notConsistent'
}

// One more example:
if (itIsRaining => iAmUsingUmbrella) {
  println 'I am dry'
} else {
  println 'I am wet'
}

       *More examples can be found at:*
1)
https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_01x.groovy
2)
https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_02x.groovy
3)
https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_03x.groovy

*Background of the "implies" operator(=>) :*
http://mathworld.wolfram.com/Implies.html
*Please let us know whether you like it, vote here:
*https://twitter.com/daniel_sun/status/824552059395465218

Cheers,
Daniel.Sun



--
View this message in context: http://groovy.329449.n5.nabble.com/VOTE-About-the-implies-operator-for-Groovy-3-tp5738129.html
Sent from the Groovy Users mailing list archive at Nabble.com.

Re: [VOTE]About the "implies" operator(=>) for Groovy 3

Posted by Guillaume Laforge <gl...@gmail.com>.
Or let's allow people to use all the smileys they want :-) :-P :o) :-D :-(

;-)

On Fri, Jan 27, 2017 at 9:46 PM, Krzysztof Kowalczyk <
kowalczyk.krzysztof@gmail.com> wrote:

> @Guillaume
> A bit, but would like to have some space to play around, maybe just =>, :=
> and |>
>
> On 27 January 2017 at 20:33, James Kleeh <ja...@gmail.com> wrote:
>
>> -1 from me as well. Too confusing
>>
>> On Jan 27, 2017, at 3:32 PM, Guillaume Laforge <gl...@gmail.com>
>> wrote:
>>
>> You're not afraid of potential asciiart abuse?
>>
>> On Fri, Jan 27, 2017 at 9:27 PM, Krzysztof Kowalczyk <
>> kowalczyk.krzysztof@gmail.com> wrote:
>>
>>> -1
>>>
>>> but I would like to have some extra operators for AST transformation
>>> that are reserved, have priority and does not have assigned logic, for
>>> instance =>, |>, @@, ^^, <-, := etc
>>>
>>> On 27 January 2017 at 08:18, Graeme Rocher <gr...@gmail.com>
>>> wrote:
>>>
>>>> -1 from me, not immediately obvious what it does and seems like it
>>>> would just confuse users for little syntactic gain.
>>>>
>>>> On Thu, Jan 26, 2017 at 5:27 PM, Daniel Sun <re...@hotmail.com>
>>>> wrote:
>>>> > Hi all,
>>>> >
>>>> >       The new parser(Parrot) supports "implies" operator(=>) now, e.g.
>>>> >
>>>> > // if and only if isDistributedTxFailed is true and isCompensated is
>>>> false,
>>>> > yields notConsistent.
>>>> > if (isDistributedTxFailed => isCompensated) {
>>>> >     println 'eventuallyConsistent '
>>>> > } else {
>>>> >     println 'notConsistent'
>>>> > }
>>>> >
>>>> > // One more example:
>>>> > if (itIsRaining => iAmUsingUmbrella) {
>>>> >   println 'I am dry'
>>>> > } else {
>>>> >   println 'I am wet'
>>>> > }
>>>> >
>>>> >        *More examples can be found at:*
>>>> > 1)
>>>> > https://github.com/danielsun1106/groovy-parser/blob/impliesO
>>>> perator/src/test/resources/core/ImpliesOp_01x.groovy
>>>> > 2)
>>>> > https://github.com/danielsun1106/groovy-parser/blob/impliesO
>>>> perator/src/test/resources/core/ImpliesOp_02x.groovy
>>>> > 3)
>>>> > https://github.com/danielsun1106/groovy-parser/blob/impliesO
>>>> perator/src/test/resources/core/ImpliesOp_03x.groovy
>>>> >
>>>> > *Background of the "implies" operator(=>) :*
>>>> > http://mathworld.wolfram.com/Implies.html
>>>> > *Please let us know whether you like it, vote here:
>>>> > *https://twitter.com/daniel_sun/status/824552059395465218
>>>> >
>>>> > Cheers,
>>>> > Daniel.Sun
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > View this message in context: http://groovy.329449.n5.nabble
>>>> .com/VOTE-About-the-implies-operator-for-Groovy-3-tp5738129.html
>>>> > Sent from the Groovy Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>>> --
>>>> Graeme Rocher
>>>>
>>>
>>>
>>
>>
>> --
>> Guillaume Laforge
>> Apache Groovy committer & PMC Vice-President
>> Developer Advocate @ Google Cloud Platform
>>
>> Blog: http://glaforge.appspot.com/
>> Social: @glaforge <http://twitter.com/glaforge> / Google+
>> <https://plus.google.com/u/0/114130972232398734985/posts>
>>
>>
>>
>


-- 
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

Blog: http://glaforge.appspot.com/
Social: @glaforge <http://twitter.com/glaforge> / Google+
<https://plus.google.com/u/0/114130972232398734985/posts>

Re: [VOTE]About the "implies" operator(=>) for Groovy 3

Posted by Krzysztof Kowalczyk <ko...@gmail.com>.
@Guillaume
A bit, but would like to have some space to play around, maybe just =>, :=
and |>

On 27 January 2017 at 20:33, James Kleeh <ja...@gmail.com> wrote:

> -1 from me as well. Too confusing
>
> On Jan 27, 2017, at 3:32 PM, Guillaume Laforge <gl...@gmail.com> wrote:
>
> You're not afraid of potential asciiart abuse?
>
> On Fri, Jan 27, 2017 at 9:27 PM, Krzysztof Kowalczyk <
> kowalczyk.krzysztof@gmail.com> wrote:
>
>> -1
>>
>> but I would like to have some extra operators for AST transformation that
>> are reserved, have priority and does not have assigned logic, for instance
>> =>, |>, @@, ^^, <-, := etc
>>
>> On 27 January 2017 at 08:18, Graeme Rocher <gr...@gmail.com>
>> wrote:
>>
>>> -1 from me, not immediately obvious what it does and seems like it
>>> would just confuse users for little syntactic gain.
>>>
>>> On Thu, Jan 26, 2017 at 5:27 PM, Daniel Sun <re...@hotmail.com>
>>> wrote:
>>> > Hi all,
>>> >
>>> >       The new parser(Parrot) supports "implies" operator(=>) now, e.g.
>>> >
>>> > // if and only if isDistributedTxFailed is true and isCompensated is
>>> false,
>>> > yields notConsistent.
>>> > if (isDistributedTxFailed => isCompensated) {
>>> >     println 'eventuallyConsistent '
>>> > } else {
>>> >     println 'notConsistent'
>>> > }
>>> >
>>> > // One more example:
>>> > if (itIsRaining => iAmUsingUmbrella) {
>>> >   println 'I am dry'
>>> > } else {
>>> >   println 'I am wet'
>>> > }
>>> >
>>> >        *More examples can be found at:*
>>> > 1)
>>> > https://github.com/danielsun1106/groovy-parser/blob/impliesO
>>> perator/src/test/resources/core/ImpliesOp_01x.groovy
>>> > 2)
>>> > https://github.com/danielsun1106/groovy-parser/blob/impliesO
>>> perator/src/test/resources/core/ImpliesOp_02x.groovy
>>> > 3)
>>> > https://github.com/danielsun1106/groovy-parser/blob/impliesO
>>> perator/src/test/resources/core/ImpliesOp_03x.groovy
>>> >
>>> > *Background of the "implies" operator(=>) :*
>>> > http://mathworld.wolfram.com/Implies.html
>>> > *Please let us know whether you like it, vote here:
>>> > *https://twitter.com/daniel_sun/status/824552059395465218
>>> >
>>> > Cheers,
>>> > Daniel.Sun
>>> >
>>> >
>>> >
>>> > --
>>> > View this message in context: http://groovy.329449.n5.nabble
>>> .com/VOTE-About-the-implies-operator-for-Groovy-3-tp5738129.html
>>> > Sent from the Groovy Users mailing list archive at Nabble.com.
>>>
>>>
>>>
>>> --
>>> Graeme Rocher
>>>
>>
>>
>
>
> --
> Guillaume Laforge
> Apache Groovy committer & PMC Vice-President
> Developer Advocate @ Google Cloud Platform
>
> Blog: http://glaforge.appspot.com/
> Social: @glaforge <http://twitter.com/glaforge> / Google+
> <https://plus.google.com/u/0/114130972232398734985/posts>
>
>
>

Re: [VOTE]About the "implies" operator(=>) for Groovy 3

Posted by James Kleeh <ja...@gmail.com>.
-1 from me as well. Too confusing

> On Jan 27, 2017, at 3:32 PM, Guillaume Laforge <gl...@gmail.com> wrote:
> 
> You're not afraid of potential asciiart abuse?
> 
> On Fri, Jan 27, 2017 at 9:27 PM, Krzysztof Kowalczyk <kowalczyk.krzysztof@gmail.com <ma...@gmail.com>> wrote:
> -1 
> 
> but I would like to have some extra operators for AST transformation that are reserved, have priority and does not have assigned logic, for instance =>, |>, @@, ^^, <-, := etc
> 
> On 27 January 2017 at 08:18, Graeme Rocher <graeme.rocher@gmail.com <ma...@gmail.com>> wrote:
> -1 from me, not immediately obvious what it does and seems like it
> would just confuse users for little syntactic gain.
> 
> On Thu, Jan 26, 2017 at 5:27 PM, Daniel Sun <realbluesun@hotmail.com <ma...@hotmail.com>> wrote:
> > Hi all,
> >
> >       The new parser(Parrot) supports "implies" operator(=>) now, e.g.
> >
> > // if and only if isDistributedTxFailed is true and isCompensated is false,
> > yields notConsistent.
> > if (isDistributedTxFailed => isCompensated) {
> >     println 'eventuallyConsistent '
> > } else {
> >     println 'notConsistent'
> > }
> >
> > // One more example:
> > if (itIsRaining => iAmUsingUmbrella) {
> >   println 'I am dry'
> > } else {
> >   println 'I am wet'
> > }
> >
> >        *More examples can be found at:*
> > 1)
> > https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_01x.groovy <https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_01x.groovy>
> > 2)
> > https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_02x.groovy <https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_02x.groovy>
> > 3)
> > https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_03x.groovy <https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_03x.groovy>
> >
> > *Background of the "implies" operator(=>) :*
> > http://mathworld.wolfram.com/Implies.html <http://mathworld.wolfram.com/Implies.html>
> > *Please let us know whether you like it, vote here:
> > *https://twitter.com/daniel_sun/status/824552059395465218 <https://twitter.com/daniel_sun/status/824552059395465218>
> >
> > Cheers,
> > Daniel.Sun
> >
> >
> >
> > --
> > View this message in context: http://groovy.329449.n5.nabble.com/VOTE-About-the-implies-operator-for-Groovy-3-tp5738129.html <http://groovy.329449.n5.nabble.com/VOTE-About-the-implies-operator-for-Groovy-3-tp5738129.html>
> > Sent from the Groovy Users mailing list archive at Nabble.com.
> 
> 
> 
> --
> Graeme Rocher
> 
> 
> 
> 
> -- 
> Guillaume Laforge
> Apache Groovy committer & PMC Vice-President
> Developer Advocate @ Google Cloud Platform
> 
> Blog: http://glaforge.appspot.com/ <http://glaforge.appspot.com/>
> Social: @glaforge <http://twitter.com/glaforge> / Google+ <https://plus.google.com/u/0/114130972232398734985/posts>

Re: [VOTE]About the "implies" operator(=>) for Groovy 3

Posted by Russel Winder <ru...@winder.org.uk>.
On Fri, 2017-01-27 at 21:32 +0100, Guillaume Laforge wrote:
> You're not afraid of potential asciiart abuse?

No.

Restricting to the operators of the 1960s is far too conservative.
Having the ability to create new operators is a good thing.

Abuse of Algol68 and Scala ability to have program defined operators to
create unreadable programs is just bad programming. 

The idea that a programming language designer and implementor should
tell programmers that they are incapable of correctly using a facility
leads us to Java.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Re: [VOTE]About the "implies" operator(=>) for Groovy 3

Posted by Guillaume Laforge <gl...@gmail.com>.
You're not afraid of potential asciiart abuse?

On Fri, Jan 27, 2017 at 9:27 PM, Krzysztof Kowalczyk <
kowalczyk.krzysztof@gmail.com> wrote:

> -1
>
> but I would like to have some extra operators for AST transformation that
> are reserved, have priority and does not have assigned logic, for instance
> =>, |>, @@, ^^, <-, := etc
>
> On 27 January 2017 at 08:18, Graeme Rocher <gr...@gmail.com>
> wrote:
>
>> -1 from me, not immediately obvious what it does and seems like it
>> would just confuse users for little syntactic gain.
>>
>> On Thu, Jan 26, 2017 at 5:27 PM, Daniel Sun <re...@hotmail.com>
>> wrote:
>> > Hi all,
>> >
>> >       The new parser(Parrot) supports "implies" operator(=>) now, e.g.
>> >
>> > // if and only if isDistributedTxFailed is true and isCompensated is
>> false,
>> > yields notConsistent.
>> > if (isDistributedTxFailed => isCompensated) {
>> >     println 'eventuallyConsistent '
>> > } else {
>> >     println 'notConsistent'
>> > }
>> >
>> > // One more example:
>> > if (itIsRaining => iAmUsingUmbrella) {
>> >   println 'I am dry'
>> > } else {
>> >   println 'I am wet'
>> > }
>> >
>> >        *More examples can be found at:*
>> > 1)
>> > https://github.com/danielsun1106/groovy-parser/blob/
>> impliesOperator/src/test/resources/core/ImpliesOp_01x.groovy
>> > 2)
>> > https://github.com/danielsun1106/groovy-parser/blob/
>> impliesOperator/src/test/resources/core/ImpliesOp_02x.groovy
>> > 3)
>> > https://github.com/danielsun1106/groovy-parser/blob/
>> impliesOperator/src/test/resources/core/ImpliesOp_03x.groovy
>> >
>> > *Background of the "implies" operator(=>) :*
>> > http://mathworld.wolfram.com/Implies.html
>> > *Please let us know whether you like it, vote here:
>> > *https://twitter.com/daniel_sun/status/824552059395465218
>> >
>> > Cheers,
>> > Daniel.Sun
>> >
>> >
>> >
>> > --
>> > View this message in context: http://groovy.329449.n5.nabble
>> .com/VOTE-About-the-implies-operator-for-Groovy-3-tp5738129.html
>> > Sent from the Groovy Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Graeme Rocher
>>
>
>


-- 
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

Blog: http://glaforge.appspot.com/
Social: @glaforge <http://twitter.com/glaforge> / Google+
<https://plus.google.com/u/0/114130972232398734985/posts>

Re: [VOTE]About the "implies" operator(=>) for Groovy 3

Posted by Jeff <pr...@gmail.com>.
There is a precedent for such an operator (see
https://en.wikipedia.org/wiki/Material_conditional
<(https://en.wikipedia.org/wiki/Material_conditional> and
https://en.wikipedia.org/wiki/Truth_table#Logical_implication) and I
personally don't oppose it out of hand, despite it being slightly confusing
for me having not dealt with/studied such an operator previously.

So working this out for my own benefit, and using the Venn diagram
<https://en.wikipedia.org/wiki/Material_conditional#/media/File:Venn1011.svg>
in the first Wikipedia link above to represent the condition being
represented, red being the 'true' case and white being 'false', the example:

if (itIsRaining => iAmUsingUmbrella) {
  println 'I am dry'
} else {
  println 'I am wet'
}


could be written using more traditional operators as:

if (!itIsRaining || iAmUsingUmbrella) {
  println 'I am dry'
} else {
  println 'I am wet'
}

Using the truth table for implication (see 2nd link above):
*Implication*
*itIsRaining   (p)**iAmUsingUmbrella (q)**p* → *q*
T T T
T F F
F T T
F F T


and the wiki validates that *"p → q is equivalent to ¬p ∨ q."  *So really,
it is simply another way to represent a conditional relationship.


I vote include it for those situations where this operator makes more
sense. Those who don't need/like it can continue using more traditional
operators.

My $0.02. ;-)


-Jeff

On Fri, Jan 27, 2017 at 1:57 PM, Paolo Di Tommaso <paolo.ditommaso@gmail.com
> wrote:

> I agree on this. It could be very useful for custom DSL.
>
>
> Cheers, Paolo
>
> On Fri, Jan 27, 2017 at 9:27 PM, Krzysztof Kowalczyk <
> kowalczyk.krzysztof@gmail.com> wrote:
>
>> -1
>>
>> but I would like to have some extra operators for AST transformation that
>> are reserved, have priority and does not have assigned logic, for instance
>> =>, |>, @@, ^^, <-, := etc
>>
>> On 27 January 2017 at 08:18, Graeme Rocher <gr...@gmail.com>
>> wrote:
>>
>>> -1 from me, not immediately obvious what it does and seems like it
>>> would just confuse users for little syntactic gain.
>>>
>>> On Thu, Jan 26, 2017 at 5:27 PM, Daniel Sun <re...@hotmail.com>
>>> wrote:
>>> > Hi all,
>>> >
>>> >       The new parser(Parrot) supports "implies" operator(=>) now, e.g.
>>> >
>>> > // if and only if isDistributedTxFailed is true and isCompensated is
>>> false,
>>> > yields notConsistent.
>>> > if (isDistributedTxFailed => isCompensated) {
>>> >     println 'eventuallyConsistent '
>>> > } else {
>>> >     println 'notConsistent'
>>> > }
>>> >
>>> > // One more example:
>>> > if (itIsRaining => iAmUsingUmbrella) {
>>> >   println 'I am dry'
>>> > } else {
>>> >   println 'I am wet'
>>> > }
>>> >
>>> >        *More examples can be found at:*
>>> > 1)
>>> > https://github.com/danielsun1106/groovy-parser/blob/impliesO
>>> perator/src/test/resources/core/ImpliesOp_01x.groovy
>>> > 2)
>>> > https://github.com/danielsun1106/groovy-parser/blob/impliesO
>>> perator/src/test/resources/core/ImpliesOp_02x.groovy
>>> > 3)
>>> > https://github.com/danielsun1106/groovy-parser/blob/impliesO
>>> perator/src/test/resources/core/ImpliesOp_03x.groovy
>>> >
>>> > *Background of the "implies" operator(=>) :*
>>> > http://mathworld.wolfram.com/Implies.html
>>> > *Please let us know whether you like it, vote here:
>>> > *https://twitter.com/daniel_sun/status/824552059395465218
>>> >
>>> > Cheers,
>>> > Daniel.Sun
>>> >
>>> >
>>> >
>>> > --
>>> > View this message in context: http://groovy.329449.n5.nabble
>>> .com/VOTE-About-the-implies-operator-for-Groovy-3-tp5738129.html
>>> > Sent from the Groovy Users mailing list archive at Nabble.com.
>>>
>>>
>>>
>>> --
>>> Graeme Rocher
>>>
>>
>>
>

Re: [VOTE]About the "implies" operator(=>) for Groovy 3

Posted by Paolo Di Tommaso <pa...@gmail.com>.
I agree on this. It could be very useful for custom DSL.


Cheers, Paolo

On Fri, Jan 27, 2017 at 9:27 PM, Krzysztof Kowalczyk <
kowalczyk.krzysztof@gmail.com> wrote:

> -1
>
> but I would like to have some extra operators for AST transformation that
> are reserved, have priority and does not have assigned logic, for instance
> =>, |>, @@, ^^, <-, := etc
>
> On 27 January 2017 at 08:18, Graeme Rocher <gr...@gmail.com>
> wrote:
>
>> -1 from me, not immediately obvious what it does and seems like it
>> would just confuse users for little syntactic gain.
>>
>> On Thu, Jan 26, 2017 at 5:27 PM, Daniel Sun <re...@hotmail.com>
>> wrote:
>> > Hi all,
>> >
>> >       The new parser(Parrot) supports "implies" operator(=>) now, e.g.
>> >
>> > // if and only if isDistributedTxFailed is true and isCompensated is
>> false,
>> > yields notConsistent.
>> > if (isDistributedTxFailed => isCompensated) {
>> >     println 'eventuallyConsistent '
>> > } else {
>> >     println 'notConsistent'
>> > }
>> >
>> > // One more example:
>> > if (itIsRaining => iAmUsingUmbrella) {
>> >   println 'I am dry'
>> > } else {
>> >   println 'I am wet'
>> > }
>> >
>> >        *More examples can be found at:*
>> > 1)
>> > https://github.com/danielsun1106/groovy-parser/blob/
>> impliesOperator/src/test/resources/core/ImpliesOp_01x.groovy
>> > 2)
>> > https://github.com/danielsun1106/groovy-parser/blob/
>> impliesOperator/src/test/resources/core/ImpliesOp_02x.groovy
>> > 3)
>> > https://github.com/danielsun1106/groovy-parser/blob/
>> impliesOperator/src/test/resources/core/ImpliesOp_03x.groovy
>> >
>> > *Background of the "implies" operator(=>) :*
>> > http://mathworld.wolfram.com/Implies.html
>> > *Please let us know whether you like it, vote here:
>> > *https://twitter.com/daniel_sun/status/824552059395465218
>> >
>> > Cheers,
>> > Daniel.Sun
>> >
>> >
>> >
>> > --
>> > View this message in context: http://groovy.329449.n5.nabble
>> .com/VOTE-About-the-implies-operator-for-Groovy-3-tp5738129.html
>> > Sent from the Groovy Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Graeme Rocher
>>
>
>

Re: [VOTE]About the "implies" operator(=>) for Groovy 3

Posted by Krzysztof Kowalczyk <ko...@gmail.com>.
-1

but I would like to have some extra operators for AST transformation that
are reserved, have priority and does not have assigned logic, for instance
=>, |>, @@, ^^, <-, := etc

On 27 January 2017 at 08:18, Graeme Rocher <gr...@gmail.com> wrote:

> -1 from me, not immediately obvious what it does and seems like it
> would just confuse users for little syntactic gain.
>
> On Thu, Jan 26, 2017 at 5:27 PM, Daniel Sun <re...@hotmail.com>
> wrote:
> > Hi all,
> >
> >       The new parser(Parrot) supports "implies" operator(=>) now, e.g.
> >
> > // if and only if isDistributedTxFailed is true and isCompensated is
> false,
> > yields notConsistent.
> > if (isDistributedTxFailed => isCompensated) {
> >     println 'eventuallyConsistent '
> > } else {
> >     println 'notConsistent'
> > }
> >
> > // One more example:
> > if (itIsRaining => iAmUsingUmbrella) {
> >   println 'I am dry'
> > } else {
> >   println 'I am wet'
> > }
> >
> >        *More examples can be found at:*
> > 1)
> > https://github.com/danielsun1106/groovy-parser/
> blob/impliesOperator/src/test/resources/core/ImpliesOp_01x.groovy
> > 2)
> > https://github.com/danielsun1106/groovy-parser/
> blob/impliesOperator/src/test/resources/core/ImpliesOp_02x.groovy
> > 3)
> > https://github.com/danielsun1106/groovy-parser/
> blob/impliesOperator/src/test/resources/core/ImpliesOp_03x.groovy
> >
> > *Background of the "implies" operator(=>) :*
> > http://mathworld.wolfram.com/Implies.html
> > *Please let us know whether you like it, vote here:
> > *https://twitter.com/daniel_sun/status/824552059395465218
> >
> > Cheers,
> > Daniel.Sun
> >
> >
> >
> > --
> > View this message in context: http://groovy.329449.n5.
> nabble.com/VOTE-About-the-implies-operator-for-Groovy-3-tp5738129.html
> > Sent from the Groovy Users mailing list archive at Nabble.com.
>
>
>
> --
> Graeme Rocher
>

Re: [VOTE]About the "implies" operator(=>) for Groovy 3

Posted by Graeme Rocher <gr...@gmail.com>.
-1 from me, not immediately obvious what it does and seems like it
would just confuse users for little syntactic gain.

On Thu, Jan 26, 2017 at 5:27 PM, Daniel Sun <re...@hotmail.com> wrote:
> Hi all,
>
>       The new parser(Parrot) supports "implies" operator(=>) now, e.g.
>
> // if and only if isDistributedTxFailed is true and isCompensated is false,
> yields notConsistent.
> if (isDistributedTxFailed => isCompensated) {
>     println 'eventuallyConsistent '
> } else {
>     println 'notConsistent'
> }
>
> // One more example:
> if (itIsRaining => iAmUsingUmbrella) {
>   println 'I am dry'
> } else {
>   println 'I am wet'
> }
>
>        *More examples can be found at:*
> 1)
> https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_01x.groovy
> 2)
> https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_02x.groovy
> 3)
> https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_03x.groovy
>
> *Background of the "implies" operator(=>) :*
> http://mathworld.wolfram.com/Implies.html
> *Please let us know whether you like it, vote here:
> *https://twitter.com/daniel_sun/status/824552059395465218
>
> Cheers,
> Daniel.Sun
>
>
>
> --
> View this message in context: http://groovy.329449.n5.nabble.com/VOTE-About-the-implies-operator-for-Groovy-3-tp5738129.html
> Sent from the Groovy Users mailing list archive at Nabble.com.



-- 
Graeme Rocher