Re: [VOTE] new operator ?=

2016-11-23 Thread Jacopo Cappellato
+1 Jacopo On Wed, Nov 23, 2016 at 4:59 PM, Daniel Sun wrote: > Hi all, > > If the new operator ?= (e.g. a ?= 'foo' is equivalent of a = a ?: > 'foo') were to be added to Groovy programming language, do you like it? > (Yes: +1; No: -1; Not bad: 0) > > Cheers, > Daniel.Sun > > > > -- > Vi

Re: [VOTE] new operator ?=

2016-11-23 Thread Leo Bartoloni
+1 Il 24 nov 2016 1:30 AM, "Daniel Sun" ha scritto: > I like the nickname "Elvis assignment" for ?= > > Cheers, > Daniel.Sun > > > > 在 2016年11月24日 04:18,"Guillaume Laforge [via Groovy]" email] >写道: type="att > Sounds about right. > > On Wed

Re: [VOTE] new operator ?=

2016-11-23 Thread Daniel Sun
I like the nickname "Elvis assignment" for ?= Cheers, Daniel.Sun 在 2016年11月24日 04:18,"Guillaume Laforge [via Groovy]" 写道:http://jroller.com/aalmiray 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: Tho

Re: [VOTE] new operator ?=

2016-11-23 Thread John Wagenleitner
+1 On Nov 23, 2016 7:59 AM, "Daniel Sun" wrote: > Hi all, > > If the new operator ?= (e.g. a ?= 'foo' is equivalent of a = a ?: > 'foo') were to be added to Groovy programming language, do you like it? > (Yes: +1; No: -1; Not bad: 0) > > Cheers, > Daniel.Sun > > > > -- > View this messag

Re: [VOTE] new operator ?=

2016-11-23 Thread Peter McNeil
+1 On 24/11/16 02:59, Daniel Sun wrote: Hi all, If the new operator ?= (e.g. a ?= 'foo' is equivalent of a = a ?: 'foo') were to be added to Groovy programming language, do you like it? (Yes: +1; No: -1; Not bad: 0) Cheers, Daniel.Sun -- View this message in context: http://groov

Re: Named function arguments in Groovy

2016-11-23 Thread Krzysztof Kowalczyk
Hi Michael, Have you flowing feature request? https://issues.apache.org/jira/browse/GROOVY-7956 Check links in the comments. Regards, Krzysztof On 23 November 2016 at 20:01, OC wrote: > Michael, > > On 23. 11. 2016, at 8:50, Michael Rüegg wrote: > > > The problem with this approach is that f

Re: [VOTE] new operator ?=

2016-11-23 Thread Guillaume Laforge
Sounds about right. On Wed, Nov 23, 2016 at 9:07 PM, Shil Sinha wrote: > Elvis assignment? > > On Wed, Nov 23, 2016 at 1:47 PM Andres Almiray wrote: > >> Long live pompaduor walrus ... >> >> What would be an appropriate nickname for ?=, I wonder. >> >> --

Re: [VOTE] new operator ?=

2016-11-23 Thread Jochen Theodorou
On 23.11.2016 19:47, Andres Almiray wrote: Long live pompaduor walrus ... What would be an appropriate nickname for ?=, I wonder. Elvis, the fat years? bye Jochen

Re: [VOTE] new operator ?=

2016-11-23 Thread Shil Sinha
Elvis assignment? On Wed, Nov 23, 2016 at 1:47 PM Andres Almiray wrote: > Long live pompaduor walrus ... > > What would be an appropriate nickname for ?=, I wonder. > > --- > Java Champion; Groovy Enthusiast > http://jroller.com/aalmiray > http://www.linke

Re: Named function arguments in Groovy

2016-11-23 Thread OC
Michael, On 23. 11. 2016, at 8:50, Michael Rüegg wrote: > The problem with this approach is that for a user of this DSL, it is not > obvious which parameters are expected and what their names are (beside > documenting it, but who is going to read that ;-)). Well, if someone is too sexy to re

RE: ClosureSignatureHint for class generic type?

2016-11-23 Thread Winnebeck, Jason
I never received a response from this, but my DSL changed slightly such that the closure is called with the receiving object rather than the generic parameter of the receiving object, and that template parameter is picked up properly, and in that case I can have a getter methods that return type

Re: [VOTE] new operator ?=

2016-11-23 Thread Andres Almiray
Long live pompaduor walrus ... What would be an appropriate nickname for ?=, I wonder. --- Java Champion; Groovy Enthusiast http://jroller.com/aalmiray http://www.linkedin.com/in/aalmiray -- What goes up, must come down. Ask any system administrator. There

Re: [VOTE] new operator ?=

2016-11-23 Thread Mihai Cazacu
+1

Re: [VOTE] new operator ?=

2016-11-23 Thread Paul King
For all our other operators of the form: a X= b it is shorthand for: a = a X b So, to follow that convention the operator is: a ?:= b which as per previous discussions is a bit cumbersome, so I am +1 for the shortened form so long as we document appropriately. Paul. On Thu, Nov 24, 2016 at

Re: [VOTE] new operator ?=

2016-11-23 Thread Gerald Wiltse
+1 Gerald R. Wiltse jerrywil...@gmail.com On Wed, Nov 23, 2016 at 12:28 PM, Winnebeck, Jason < jason.winneb...@windstream.com> wrote: > At first I was going to vote 0, because I feel like a = a ?: b is clear > (and I compare it to a = a || b from JS). However, looking at the dev list, > I defin

RE: [VOTE] new operator ?=

2016-11-23 Thread Winnebeck, Jason
At first I was going to vote 0, because I feel like a = a ?: b is clear (and I compare it to a = a || b from JS). However, looking at the dev list, I definitely see a nice case for it: person.name.last = person.name.last ?: "unknown" When you have a non-trivial assignment expression, I see the

Re: [VOTE] new operator ?=

2016-11-23 Thread Clayton Long
+1 I like it. Thanks, Clayton Sent from my smartphone; Please excuse any misspellings > On Nov 23, 2016, at 10:59 AM, Daniel Sun wrote: > > Hi all, > > If the new operator ?= (e.g. a ?= 'foo' is equivalent of a = a ?: > 'foo') were to be added to Groovy programming language, do you lik

Re: [VOTE] new operator ?=

2016-11-23 Thread Edgar Harutyunyan
+1 On 11/23/2016 08:07 PM, Søren Berg Glasius (GR8Conf EU) wrote: > +1 > > Best regards, > Søren Berg Glasius > GR8Conf Europe organizing team > > GR8Conf ApS > Mobile: +45 40 44 91 88, Web: www.gr8conf.eu , > Skype: sbglasius > Company Address: Buchwaldsgade 50, 5000 Od

Re: [VOTE] new operator ?=

2016-11-23 Thread Jim Northrop
Yes, more use cases please. Sent from my iPad > On 23 Nov 2016, at 17:00, Abhinav Sharma wrote: > > Well, you need to give more use cases for this one > >> On Nov 23, 2016 9:29 PM, "Daniel Sun" wrote: >> Hi all, >> >> If the new operator ?= (e.g. a ?= 'foo' is equivalent of a = a ?:

Re: [VOTE] new operator ?=

2016-11-23 Thread Abhinav Sharma
+1 On Nov 23, 2016 10:19 PM, "Dierk König" wrote: > +1 > > > Am 23.11.2016 um 16:59 schrieb Daniel Sun : > > > > Hi all, > > > > If the new operator ?= (e.g. a ?= 'foo' is equivalent of a = a ?: > > 'foo') were to be added to Groovy programming language, do you like it? > > (Yes: +1; No: -

Re: [VOTE] new operator ?=

2016-11-23 Thread Dierk König
+1 > Am 23.11.2016 um 16:59 schrieb Daniel Sun : > > Hi all, > > If the new operator ?= (e.g. a ?= 'foo' is equivalent of a = a ?: > 'foo') were to be added to Groovy programming language, do you like it? > (Yes: +1; No: -1; Not bad: 0) > > Cheers, > Daniel.Sun > > > > -- > View this

Re: [VOTE] new operator ?=

2016-11-23 Thread Andres Almiray
+1 --- Java Champion; Groovy Enthusiast http://jroller.com/aalmiray 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

Re: [VOTE] new operator ?=

2016-11-23 Thread GR8Conf EU
+1 Best regards, Søren Berg Glasius GR8Conf Europe organizing team GR8Conf ApS Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark --- GR8Conf - Dedicated to the Groovy Ecos

Re: [VOTE] new operator ?=

2016-11-23 Thread David Dawson
+1 On 23 November 2016 at 16:01, Guillaume Laforge wrote: > There's more context in that thread here: > http://www.groovy-lang.org/mailing-lists.html > > On Wed, Nov 23, 2016 at 5:00 PM, Abhinav Sharma > wrote: > >> Well, you need to give more use cases for this one >> On Nov 23, 2016 9:29 PM

Re: [VOTE] new operator ?=

2016-11-23 Thread Guillaume Laforge
Roh, let me fix the link: http://groovy.329449.n5.nabble.com/PROPOSAL-new-operator-tp5736886.html On Wed, Nov 23, 2016 at 5:01 PM, Guillaume Laforge wrote: > There's more context in that thread here: > http://www.groovy-lang.org/mailing-lists.html > > On Wed, Nov 23, 2016 at 5:00 PM, Abhinav Sha

Re: [VOTE] new operator ?=

2016-11-23 Thread Guillaume Laforge
There's more context in that thread here: http://www.groovy-lang.org/mailing-lists.html On Wed, Nov 23, 2016 at 5:00 PM, Abhinav Sharma wrote: > Well, you need to give more use cases for this one > On Nov 23, 2016 9:29 PM, "Daniel Sun" wrote: > >> Hi all, >> >> If the new operator ?= (e.g

Re: [VOTE] new operator ?=

2016-11-23 Thread Guillaume Laforge
Yes, +1 :-) On Wed, Nov 23, 2016 at 4:59 PM, Daniel Sun wrote: > Hi all, > > If the new operator ?= (e.g. a ?= 'foo' is equivalent of a = a ?: > 'foo') were to be added to Groovy programming language, do you like it? > (Yes: +1; No: -1; Not bad: 0) > > Cheers, > Daniel.Sun > > > > -- > V

Re: [VOTE] new operator ?=

2016-11-23 Thread Abhinav Sharma
Well, you need to give more use cases for this one On Nov 23, 2016 9:29 PM, "Daniel Sun" wrote: > Hi all, > > If the new operator ?= (e.g. a ?= 'foo' is equivalent of a = a ?: > 'foo') were to be added to Groovy programming language, do you like it? > (Yes: +1; No: -1; Not bad: 0) > > Che

[VOTE] new operator ?=

2016-11-23 Thread Daniel Sun
Hi all, If the new operator ?= (e.g. a ?= 'foo' is equivalent of a = a ?: 'foo') were to be added to Groovy programming language, do you like it? (Yes: +1; No: -1; Not bad: 0) Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/VOTE-new-operator-tp57

Re: Groovy Script Memory Management Anti-patterns

2016-11-23 Thread Daniel Price
I've 'fixed' the problem, but I don't understand what caused the OOME. Basically, my script retrieves images from a database, appends those images to a list, and then batch inserts the list with images into another database. I used VisualVM to monitor heap allocation and narrowed the issue down

RE: JDK8 Streams / Closure cast to interface

2016-11-23 Thread Winnebeck, Jason
It sounds like a good idea to support Java lambda syntax, or at least provide a way in Groovy to use Java lambdas. The only concern I have is that I still think the closure syntax is better, since you don't have parenthesis overload, and I still like the curly braces to distinguish that we are c

Re: JDK8 Streams / Closure cast to interface

2016-11-23 Thread Graeme Rocher
Jochen said - “If you want this really efficient, you have to skip the generation of the Groovy Closure instance. This is doable and I plan to do this, but it will be a breaking change (all open blocks would be realised using the same class for example, having that instance would even become option

Re: JDK8 Streams / Closure cast to interface

2016-11-23 Thread Jochen Theodorou
On 22.11.2016 19:37, Winnebeck, Jason wrote: I was referring to a compile-time generation of the class -- that the Closure itself that is normally generated implements the interface natively. Which means we are talking about direct assignments to local variables only? I mean the static comp