Re: switch destructuring

2020-08-10 Thread Leonard Brünings
gt; > *From:* MG > *Sent:* Friday, August 7, 2020 3:37 PM > *To:* dev@groovy.apache.org; Milles, Eric (TR Technology) > > *Subject:* Re: switch destructuring > >   > > Hi eric, > > just to make my post clear: I do not desperately need pattern > matching, but I k

Re: switch destructuring

2020-08-10 Thread Paul King
vy should support Java syntax as > best as possible. > > > > *From:* MG > *Sent:* Friday, August 7, 2020 3:37 PM > *To:* dev@groovy.apache.org; Milles, Eric (TR Technology) < > eric.mil...@thomsonreuters.com> > *Subject:* Re: switch destructuring > > > >

RE: switch destructuring

2020-08-10 Thread Milles, Eric (TR Technology)
es a gap between Java and Groovy. And I think Groovy should support Java syntax as best as possible. From: MG Sent: Friday, August 7, 2020 3:37 PM To: dev@groovy.apache.org; Milles, Eric (TR Technology) Subject: Re: switch destructuring Hi eric, just to make my post clear: I do not desperat

Re: switch destructuring

2020-08-07 Thread MG
ancements would cover a lot of common cases.  Then we could regroup and see what sort of edge cases remain and if there is merit in adding something to help with them. *From:* MG *Sent:* Friday, August 7, 2020 12:41 PM *To:* dev@groovy.apache.org; Paul King *Subject:* switch destructuring H

RE: switch destructuring

2020-08-07 Thread Milles, Eric (TR Technology)
nt. I agree with Paul that supporting Java's switch expression enhancements would cover a lot of common cases. Then we could regroup and see what sort of edge cases remain and if there is merit in adding something to help with them. From: MG Sent: Friday, August 7, 2020 12:41 PM To: dev@

switch destructuring

2020-08-07 Thread MG
Hi Paul, the Python destructuring sure looks powerful (I did my master thesis in Mathematica, which is all about pattern matching). Here is one of the Python examples in a potential Groovy syntax, which tries to convert its argument into a  3D-point: @Newify(pattern=/[A-Z][A-Za-z0-9_]+/) Poin