Re: [VOTE]About the Union Type for method/constructor declaration

2017-07-24 Thread Andres Almiray
+1 to Paul's approach

https://www.youtube.com/watch?v=GMNvOtQFro0

---
Java Champion; Groovy Enthusiast
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary, and
those who don't.
To understand recursion, we must first understand recursion.

On Mon, Jul 24, 2017 at 8:32 PM, Paul King  wrote:

> It's the kind of new feature (potentially wide impacting) that we have
> created Groovy Enhancement Proposals for in the past. Most recently we have
> just used well-fleshed out Jira issues with a GEP label.
>
> I'm +1 for exploring the idea further but -1 for trying to implement a
> small piece of the feature without at least fleshing out the bigger picture.
>
> Cheers, Paul.
>
>
> On 24 Jul. 2017 12:14 am, "Guillaume Laforge"  wrote:
>
>> Many people do also like that feature :-)
>> And it's good to have that conversation and discussion!
>>
>> Guillaume
>>
>> On Mon, Jul 24, 2017 at 2:06 AM, Daniel Sun 
>> wrote:
>>
>>> Because many people do not like the feature, it will not be implemented
>>> for
>>> the time being util we reach a consensus.
>>>
>>> P.S. It is actually a poll.
>>>
>>> Cheers,
>>> Daniel.Sun
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://groovy.329449.n5.nabble
>>> .com/VOTE-About-the-Union-Type-for-method-constructor-declar
>>> ation-tp5742265p5742283.html
>>> Sent from the Groovy Users mailing list archive at Nabble.com.
>>>
>>
>>
>>
>> --
>> Guillaume Laforge
>> Apache Groovy committer & PMC Vice-President
>> Developer Advocate @ Google Cloud Platform
>>
>> Blog: http://glaforge.appspot.com/
>> Social: @glaforge  / Google+
>> 
>>
>


Re: [VOTE]About the Union Type for method/constructor declaration

2017-07-24 Thread Paul King
It's the kind of new feature (potentially wide impacting) that we have
created Groovy Enhancement Proposals for in the past. Most recently we have
just used well-fleshed out Jira issues with a GEP label.

I'm +1 for exploring the idea further but -1 for trying to implement a
small piece of the feature without at least fleshing out the bigger picture.

Cheers, Paul.


On 24 Jul. 2017 12:14 am, "Guillaume Laforge"  wrote:

> Many people do also like that feature :-)
> And it's good to have that conversation and discussion!
>
> Guillaume
>
> On Mon, Jul 24, 2017 at 2:06 AM, Daniel Sun 
> wrote:
>
>> Because many people do not like the feature, it will not be implemented
>> for
>> the time being util we reach a consensus.
>>
>> P.S. It is actually a poll.
>>
>> Cheers,
>> Daniel.Sun
>>
>>
>>
>>
>> --
>> View this message in context: http://groovy.329449.n5.nabble
>> .com/VOTE-About-the-Union-Type-for-method-constructor-
>> declaration-tp5742265p5742283.html
>> Sent from the Groovy Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Guillaume Laforge
> Apache Groovy committer & PMC Vice-President
> Developer Advocate @ Google Cloud Platform
>
> Blog: http://glaforge.appspot.com/
> Social: @glaforge  / Google+
> 
>


Re: [VOTE]About the Union Type for method/constructor declaration

2017-07-24 Thread Guillaume Laforge
On Mon, Jul 24, 2017 at 10:04 AM, Jochen Theodorou 
wrote:
>
> On 23.07.2017 17:21, Guillaume Laforge wrote:
> [...]
>
>> Speaking of pattern matching, there's Brian Goetz' proposal here, for
>> pattern matching for Java:
>> http://cr.openjdk.java.net/~briangoetz/amber/pattern-match.html
>> We should also avoid offering a different syntax as to what might come
>> up in the JDK later on, to avoid having two distinct syntaxes for the
>> same thing.
>> (although this proposal doesn't cover union types per se, it's something
>> to factor in, in our decisions)
>>
>
> I see one possible influence depending if we can declare a sum type or
> not. Because if you can really declare one (and I really think you will
> want to do that), you will potentially use it in a switch-case. That will
> open a lot of problems
>

Indeed, we'd certainly want to have it in switch / case, good point.

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

Blog: http://glaforge.appspot.com/
Social: @glaforge  / Google+



Re: [VOTE]About the Union Type for method/constructor declaration

2017-07-24 Thread Jochen Theodorou



On 23.07.2017 17:21, Guillaume Laforge wrote:
[...]

Speaking of pattern matching, there's Brian Goetz' proposal here, for
pattern matching for Java:
http://cr.openjdk.java.net/~briangoetz/amber/pattern-match.html
We should also avoid offering a different syntax as to what might come
up in the JDK later on, to avoid having two distinct syntaxes for the
same thing.
(although this proposal doesn't cover union types per se, it's something
to factor in, in our decisions)


I see one possible influence depending if we can declare a sum type or 
not. Because if you can really declare one (and I really think you will 
want to do that), you will potentially use it in a switch-case. That 
will open a lot of problems


bye Jochen


Re: [VOTE]About the Union Type for method/constructor declaration

2017-07-24 Thread Guillaume Laforge
Many people do also like that feature :-)
And it's good to have that conversation and discussion!

Guillaume

On Mon, Jul 24, 2017 at 2:06 AM, Daniel Sun  wrote:

> Because many people do not like the feature, it will not be implemented for
> the time being util we reach a consensus.
>
> P.S. It is actually a poll.
>
> Cheers,
> Daniel.Sun
>
>
>
>
> --
> View this message in context: http://groovy.329449.n5.
> nabble.com/VOTE-About-the-Union-Type-for-method-constructor-declaration-
> tp5742265p5742283.html
> Sent from the Groovy Users mailing list archive at Nabble.com.
>



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

Blog: http://glaforge.appspot.com/
Social: @glaforge  / Google+