Return-Path: X-Original-To: apmail-groovy-users-archive@minotaur.apache.org Delivered-To: apmail-groovy-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B56A318D88 for ; Tue, 7 Jul 2015 20:03:53 +0000 (UTC) Received: (qmail 73022 invoked by uid 500); 7 Jul 2015 20:03:53 -0000 Delivered-To: apmail-groovy-users-archive@groovy.apache.org Received: (qmail 72988 invoked by uid 500); 7 Jul 2015 20:03:53 -0000 Mailing-List: contact users-help@groovy.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.incubator.apache.org Delivered-To: mailing list users@groovy.incubator.apache.org Received: (qmail 72977 invoked by uid 99); 7 Jul 2015 20:03:53 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2015 20:03:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 1768AC068C for ; Tue, 7 Jul 2015 20:03:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id xO_mrSRq7pPF for ; Tue, 7 Jul 2015 20:03:46 +0000 (UTC) Received: from mail-yk0-f179.google.com (mail-yk0-f179.google.com [209.85.160.179]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id A30CD42AD0 for ; Tue, 7 Jul 2015 20:03:46 +0000 (UTC) Received: by ykeo3 with SMTP id o3so67709489yke.0 for ; Tue, 07 Jul 2015 13:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Se/UBMVKt8leQZo3zfay9i39AKP2HVSn+T5wGy0YHQY=; b=JYZLOedoTS8oz7UXnfkWlKI3UziA86ItTamKD3qS+8oyPV5VI+IxgH84VVndZlEbGp /14uX3f/RJdZb+HigmXoplc4R7LuZT5uMyBImCvkJcRdtp6H7we7Z/m0LYwJY+xtJGYq AB0pQD31kbzyWLerFTjSRa652PSfHtR17eRZqEEDxMLAQvwAsKk9XDxVUbIi7XZg4eXT ia6o8wdm1t6/WvslUuCnfzDpppjcZ51tTR3bvsWcEUV6GkfFQ+HYaSOegUZBUC8XcnY2 /x+bZuskyfRdZ/9k16/3rQrb8YJ8GL2HD+NdwVV+6+fbBAVzh7LXacXZJa1eyVACqahF TqUg== X-Received: by 10.129.51.141 with SMTP id z135mr6627952ywz.99.1436299426190; Tue, 07 Jul 2015 13:03:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.226.210 with HTTP; Tue, 7 Jul 2015 13:03:26 -0700 (PDT) In-Reply-To: References: From: Keegan Witt Date: Tue, 7 Jul 2015 16:03:26 -0400 Message-ID: Subject: Re: vararg syntax question To: users@groovy.incubator.apache.org Content-Type: multipart/alternative; boundary=001a1142155e16dbb4051a4e858b --001a1142155e16dbb4051a4e858b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Maybe it's your compiler that broke, and not Groovy. How are you compiling this? -Keegan On Tue, Jul 7, 2015 at 3:49 PM, Dinko Srko=C4=8D wr= ote: > I can't prove it, but I don't think anything changed between 2.1.6 and > 2.1.8 regarding handling (named) parameters. Even more, I don't think > anything changed there for a long time. > > I tried your example with 1.8.6, 2.1.6, 2.1.8, and 2.4.1 and all those > versions behave the same. > > Example that I tried: > > def openModalWindow(Map options=3D[:], Object screenName) { > println "screenName=3D$screenName, options=3D$options" > } > > def t1 =3D 'foo' > def stuff =3D 42 > > openModalWindow 'EditScreen', fromType: t1, withData: stuff > // prints: screenName=3DEditScreen, options=3D[fromType:foo, withData= :42] > > Cheers, > Dinko > > On 7 July 2015 at 21:24, Ralph Johnson wrote: > > I switched compilers from 2.1.6 to 2.1.8 and something broke. I am > thinking > > that perhaps an old language feature went away. > > > > We have scripts that say something like > > > > openModalWindow 'EditScreen', fromType: t1, withData: stuff > > > > and it gets translated into a call on > > > > def openModalWindow(Map options=3D[:], Object screenName) { > > > > ... > > > > } > > > > where options will be the map {fromType: t1, withData: stuff} except > that it > > has the values of the variables t1 and stuff. Did this go away? If so= , > > what should I replace it with? I can't actually find documentation fo= r > it, > > which leads me to believe it was deprecated. I > --001a1142155e16dbb4051a4e858b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Maybe it's your compiler that broke, and not Groo= vy.=C2=A0 How are you compiling this?

-Keegan

On Tue, Jul 7, 2015 at 3= :49 PM, Dinko Srko=C4=8D <dinko.srkoc@gmail.com> wrote:<= br>
I can't prove it, but I don't thi= nk anything changed between 2.1.6 and
2.1.8 regarding handling (named) parameters. Even more, I don't think anything changed there for a long time.

I tried your example with 1.8.6, 2.1.6, 2.1.8, and 2.4.1 and all those
versions behave the same.

Example that I tried:

=C2=A0 =C2=A0 def openModalWindow(Map options=3D[:], Object screenName) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 println "screenName=3D$screenName, = options=3D$options"
=C2=A0 =C2=A0 }

=C2=A0 =C2=A0 def t1 =3D 'foo'
=C2=A0 =C2=A0 def stuff =3D 42

=C2=A0 =C2=A0 openModalWindow 'EditScreen', fromType: t1, withData:= stuff
=C2=A0 =C2=A0 // prints: screenName=3DEditScreen, options=3D[fromTyp= e:foo, withData:42]

Cheers,
Dinko

On 7 July 2015 at 21:24, Ralph Johnson <johnson@cs.uiuc.edu> wrote:
> I switched compilers from 2.1.6 to 2.1.8 and something broke.=C2=A0 I = am thinking
> that perhaps an old language feature went away.
>
> We have scripts that say something like
>
> openModalWindow 'EditScreen', fromType: t1, withData: stuff >
> and it gets translated into a call on
>
> def openModalWindow(Map options=3D[:], Object screenName) {
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ...
>
> }
>
> where options will be the map {fromType: t1, withData: stuff} except t= hat it
> has the values of the variables t1 and stuff.=C2=A0 Did this go away?= =C2=A0 If so,
> what should I replace it with?=C2=A0 =C2=A0I can't actually find d= ocumentation for it,
> which leads me to believe it was deprecated.=C2=A0 I

--001a1142155e16dbb4051a4e858b--