Re: [PROPOSAL]Support conditional return

2020-08-07 Thread Paul King
https://github.com/apache/groovy/pull/1343 On Sat, Aug 8, 2020 at 3:25 AM MG wrote: > GitHub link ?-) > > On 07/08/2020 12:53, Paul King wrote: > > I created a starting set of NV, NVI and NVD macros similar (but > > slightly different) to what mg has described previously. I see that as > > a

Re: switch destructuring

2020-08-07 Thread MG
Hi eric, just to make my post clear: I do not desperately need pattern matching, but I know from experience that (full blown) pattern matching is a very powerful feature (I implemented automatic series expansion of quantum field theory Green functions through functional derivatives using

RE: switch destructuring

2020-08-07 Thread Milles, Eric (TR Technology)
There is a pattern match syntax that is implemented using Groovy macros so that you can use the match "keyword". https://github.com/bsideup/groovy-pattern-match/blob/feature/dsl-like-matching/src/test/groovy/ru/trylogic/groovy/pattern/PatternMatchingMacroMethodsTest.groovy The current version

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_]+/)

Re: [PROPOSAL]Support conditional return

2020-08-07 Thread MG
GitHub link ?-) On 07/08/2020 12:53, Paul King wrote: I created a starting set of NV, NVI and NVD macros similar (but slightly different) to what mg has described previously. I see that as a starting point for discussion.

Re: [PROPOSAL]Support conditional return

2020-08-07 Thread Paul King
I created a starting set of NV, NVI and NVD macros similar (but slightly different) to what mg has described previously. I see that as a starting point for discussion. Something like 'returnIf' wouldn't be hard to add but I'd personally prefer to explore enhancing our switch statement first since

Re: StaticPropertyAccessHelper transforms are not routed through my expression transformer

2020-08-07 Thread Saravanan Palanichamy
Thank you Eric. Let me know how I can help. regards Saravanan On Thu, Aug 6, 2020 at 7:35 PM Milles, Eric (TR Technology) < eric.mil...@thomsonreuters.com> wrote: > Your assessment appears correct. > > PropertyExpression works like this: > public Expression