You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by MG <mg...@arscreat.com> on 2018/07/21 21:50:14 UTC

fin

Hi guys,

I have been wondering for a while whether Groovy developers use "def" 
even if a variable is actually is "final" not only because every Groovy 
example code uses "def", but also because "final" as a word is longer 
than "def".
Therefore I propose to introduce the shortcut "fin" for "final" in Groovy.

e.g. to support

class Goo {
     fin String name
     fin Goo gooParent
     Goo(fin String name, fin Goo gooParent) { ... }
     String gooGoal(fin x) {
         fin y = 2*x
         fin int z = x + y
     }
}

Cheers,
mg




Re: fin

Posted by MG <mg...@arscreat.com>.
One of the reasons I suggest this now is, that it would be perfect to 
introduce such changes in Groovy 3.0: People expect changes, articles 
and books with the new syntax are written...

I test switched our project to Groovy 2.5, and the (improved) final 
support actual caught 3 places where final variables had been reassigned ;-)

@AutoFinal does not apply to local variables (by (our) design).

"So some advocate omitting the final keyword but coding as if it was 
there to obtain more succinct, easier to read code.".
But using "fin" instead of "def" would /actually /use final, while 
supplying the exact same amount of succcintness ?-)

Cheers,
mg



On 22.07.2018 08:53, Paul King wrote:
> I am probably -1 right now on a new keyword when I think the existing 
> one works just fine.
>
> One reason some Groovy folks might not use final more frequently is 
> because it has
> historically (up until 2.4.x) been ignored by Groovy for local 
> variables. Java
> also ignores final at runtime for local variables but that doesn't 
> matter for a statically
> compiled language. Have a look at the bytecode using javap -v from 
> this Java program:
>
> public class Hello {
> public void method1() {
> final Object o1 = new Object();
> }
> public void method2() {
> Object o2 = new Object();
> }
> }
>
> You will notice that the bytecode for method1 and method2 is identical.
> Groovy 2.5 does a better job of detecting final for local variables. 
> It does it
> in a similar sort of way to Java - at compile time. I'd be inclined to 
> wait and
> see how this added support (plus @AutoFinal) affects usage.
>
> The other discussions I have seen around not using final are around style.
> The 'final' modifier is particularly good at stopping the practice of 
> mutating some
> variable mid-way through a long method in a confusing way. Agile practices
> discourage long methods, functional style discourages mutating variables
> and codenarc can be used to some extent to catch bad behavior. So some
> advocate omitting the final keyword but coding as if it was there to 
> obtain
> more succinct, easier to read code. Now that we have @AutoFinal, I am
> not sure that we need to aggressively further promote its usage but rather
> watch how usage changes in the short term.
>
> Cheers, Paul.
>
>
> On Sun, Jul 22, 2018 at 7:50 AM MG <mgbiz@arscreat.com 
> <ma...@arscreat.com>> wrote:
>
>     Hi guys,
>
>     I have been wondering for a while whether Groovy developers use "def"
>     even if a variable is actually is "final" not only because every
>     Groovy
>     example code uses "def", but also because "final" as a word is longer
>     than "def".
>     Therefore I propose to introduce the shortcut "fin" for "final" in
>     Groovy.
>
>     e.g. to support
>
>     class Goo {
>          fin String name
>          fin Goo gooParent
>          Goo(fin String name, fin Goo gooParent) { ... }
>          String gooGoal(fin x) {
>              fin y = 2*x
>              fin int z = x + y
>          }
>     }
>
>     Cheers,
>     mg
>
>
>


Re: fin

Posted by Guillaume Laforge <gl...@gmail.com>.
By the way you only need "final goo = ..."
No need for 'var' in between.

(and for me 'final' doesn't seem too long to type) :-)

On Sun, Jul 22, 2018 at 11:10 PM MG <mg...@arscreat.com> wrote:

> I also have a C/C++ background, and would also (still) like to have true
> const ;-)
> However, Java/Groovy final was never intended to be const, it declares a
> const reference/pointer in C++ speak, and using final instead of def has
> zero disadvantages, but multiple advantages (which I have already listed
> multiple times here).
>
> And if
>
> fin goo = new Goo()
>
> in Groovy is short for
>
> final var goo = new Goo() // final Goo goo = new Goo()
>
> no one would need to "code as if object(s) are final", but could just make
> them final with zero overhead, compared to using either def or var (and for
> immutability there is the new improved Groovy immutable support).
>
> Cheers,
> mg
>
>
>
>
>
> On 22.07.2018 20:23, Suderman Keith wrote:
>
> -1
>
> Coming from a C/C++ background that has `const` I typically do not use
> final because it does not give me a truly final (const) object and users
> can still do:
>
> final object = new SomeMutableObject()
> object.mutateMe();
>
>
> That just rubs me the wrong way. So as Pau says below, I typically skip
> the final keyword, but code as if object(s) are final/const as needed.
>
> Keith
>
> On Jul 22, 2018, at 1:53 AM, Paul King <pa...@asert.com.au> wrote:
>
> I am probably -1 right now on a new keyword when I think the existing one
> works just fine.
>
> One reason some Groovy folks might not use final more frequently is
> because it has
> historically (up until 2.4.x) been ignored by Groovy for local variables.
> Java
> also ignores final at runtime for local variables but that doesn't matter
> for a statically
> compiled language. Have a look at the bytecode using javap -v from this
> Java program:
>
> public class Hello {
> public void method1() {
> final Object o1 = new Object();
> }
> public void method2() {
> Object o2 = new Object();
> }
> }
>
> You will notice that the bytecode for method1 and method2 is identical.
> Groovy 2.5 does a better job of detecting final for local variables. It
> does it
> in a similar sort of way to Java - at compile time. I'd be inclined to
> wait and
> see how this added support (plus @AutoFinal) affects usage.
>
> The other discussions I have seen around not using final are around style.
> The 'final' modifier is particularly good at stopping the practice of
> mutating some
> variable mid-way through a long method in a confusing way. Agile practices
> discourage long methods, functional style discourages mutating variables
> and codenarc can be used to some extent to catch bad behavior. So some
> advocate omitting the final keyword but coding as if it was there to obtain
> more succinct, easier to read code. Now that we have @AutoFinal, I am
> not sure that we need to aggressively further promote its usage but rather
> watch how usage changes in the short term.
>
> Cheers, Paul.
>
>
> On Sun, Jul 22, 2018 at 7:50 AM MG <mg...@arscreat.com> wrote:
>
>> Hi guys,
>>
>> I have been wondering for a while whether Groovy developers use "def"
>> even if a variable is actually is "final" not only because every Groovy
>> example code uses "def", but also because "final" as a word is longer
>> than "def".
>> Therefore I propose to introduce the shortcut "fin" for "final" in Groovy.
>>
>> e.g. to support
>>
>> class Goo {
>>      fin String name
>>      fin Goo gooParent
>>      Goo(fin String name, fin Goo gooParent) { ... }
>>      String gooGoal(fin x) {
>>          fin y = 2*x
>>          fin int z = x + y
>>      }
>> }
>>
>> Cheers,
>> mg
>>
>>
>>
>>
>
>

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

Blog: http://glaforge.appspot.com/
Twitter: @glaforge <http://twitter.com/glaforge>

Re: fin

Posted by MG <mg...@arscreat.com>.
I also have a C/C++ background, and would also (still) like to have true 
const ;-)
However, Java/Groovy final was never intended to be const, it declares a 
const reference/pointer in C++ speak, and using final instead of def has 
zero disadvantages, but multiple advantages (which I have already listed 
multiple times here).

And if

fin goo = new Goo()

in Groovy is short for

final var goo = new Goo() // final Goo goo = new Goo()

no one would need to "code as if object(s) are final", but could just 
make them final with zero overhead, compared to using either def or var 
(and for immutability there is the new improved Groovy immutable support).

Cheers,
mg





On 22.07.2018 20:23, Suderman Keith wrote:
> -1
>
> Coming from a C/C++ background that has `const` I typically do not use 
> final because it does not give me a truly final (const) object and 
> users can still do:
>
>     final object = new SomeMutableObject()
>     object.mutateMe();
>
>
> That just rubs me the wrong way. So as Pau says below, I typically 
> skip the final keyword, but code as if object(s) are final/const as 
> needed.
>
> Keith
>
>> On Jul 22, 2018, at 1:53 AM, Paul King <paulk@asert.com.au 
>> <ma...@asert.com.au>> wrote:
>>
>> I am probably -1 right now on a new keyword when I think the existing 
>> one works just fine.
>>
>> One reason some Groovy folks might not use final more frequently is 
>> because it has
>> historically (up until 2.4.x) been ignored by Groovy for local 
>> variables. Java
>> also ignores final at runtime for local variables but that doesn't 
>> matter for a statically
>> compiled language. Have a look at the bytecode using javap -v from 
>> this Java program:
>>
>> public class Hello {
>> public void method1() {
>> final Object o1 = new Object();
>> }
>> public void method2() {
>> Object o2 = new Object();
>> }
>> }
>>
>> You will notice that the bytecode for method1 and method2 is identical.
>> Groovy 2.5 does a better job of detecting final for local variables. 
>> It does it
>> in a similar sort of way to Java - at compile time. I'd be inclined 
>> to wait and
>> see how this added support (plus @AutoFinal) affects usage.
>>
>> The other discussions I have seen around not using final are around 
>> style.
>> The 'final' modifier is particularly good at stopping the practice of 
>> mutating some
>> variable mid-way through a long method in a confusing way. Agile 
>> practices
>> discourage long methods, functional style discourages mutating variables
>> and codenarc can be used to some extent to catch bad behavior. So some
>> advocate omitting the final keyword but coding as if it was there to 
>> obtain
>> more succinct, easier to read code. Now that we have @AutoFinal, I am
>> not sure that we need to aggressively further promote its usage but 
>> rather
>> watch how usage changes in the short term.
>>
>> Cheers, Paul.
>>
>>
>> On Sun, Jul 22, 2018 at 7:50 AM MG <mgbiz@arscreat.com 
>> <ma...@arscreat.com>> wrote:
>>
>>     Hi guys,
>>
>>     I have been wondering for a while whether Groovy developers use
>>     "def"
>>     even if a variable is actually is "final" not only because every
>>     Groovy
>>     example code uses "def", but also because "final" as a word is
>>     longer
>>     than "def".
>>     Therefore I propose to introduce the shortcut "fin" for "final"
>>     in Groovy.
>>
>>     e.g. to support
>>
>>     class Goo {
>>          fin String name
>>          fin Goo gooParent
>>          Goo(fin String name, fin Goo gooParent) { ... }
>>          String gooGoal(fin x) {
>>              fin y = 2*x
>>              fin int z = x + y
>>          }
>>     }
>>
>>     Cheers,
>>     mg
>>
>>
>>
>


Re: fin

Posted by Suderman Keith <ke...@vassar.edu>.
-1

Coming from a C/C++ background that has `const` I typically do not use final because it does not give me a truly final (const) object and users can still do:

final object = new SomeMutableObject()
object.mutateMe();

That just rubs me the wrong way. So as Pau says below, I typically skip the final keyword, but code as if object(s) are final/const as needed.

Keith

> On Jul 22, 2018, at 1:53 AM, Paul King <pa...@asert.com.au> wrote:
> 
> I am probably -1 right now on a new keyword when I think the existing one works just fine.
> 
> One reason some Groovy folks might not use final more frequently is because it has
> historically (up until 2.4.x) been ignored by Groovy for local variables. Java
> also ignores final at runtime for local variables but that doesn't matter for a statically
> compiled language. Have a look at the bytecode using javap -v from this Java program:
> 
> public class Hello {
> 	public void method1() {
> 		final Object o1 = new Object();
> 	}
> 	public void method2() {
> 		Object o2 = new Object();
> 	}
> }
> 
> You will notice that the bytecode for method1 and method2 is identical.
> Groovy 2.5 does a better job of detecting final for local variables. It does it
> in a similar sort of way to Java - at compile time. I'd be inclined to wait and
> see how this added support (plus @AutoFinal <>) affects usage.
> 
> The other discussions I have seen around not using final are around style.
> The 'final' modifier is particularly good at stopping the practice of mutating some
> variable mid-way through a long method in a confusing way. Agile practices
> discourage long methods, functional style discourages mutating variables
> and codenarc can be used to some extent to catch bad behavior. So some
> advocate omitting the final keyword but coding as if it was there to obtain
> more succinct, easier to read code. Now that we have @AutoFinal, I am
> not sure that we need to aggressively further promote its usage but rather
> watch how usage changes in the short term.
> 
> Cheers, Paul.
> 
> 
> On Sun, Jul 22, 2018 at 7:50 AM MG <mgbiz@arscreat.com <ma...@arscreat.com>> wrote:
> Hi guys,
> 
> I have been wondering for a while whether Groovy developers use "def" 
> even if a variable is actually is "final" not only because every Groovy 
> example code uses "def", but also because "final" as a word is longer 
> than "def".
> Therefore I propose to introduce the shortcut "fin" for "final" in Groovy.
> 
> e.g. to support
> 
> class Goo {
>      fin String name
>      fin Goo gooParent
>      Goo(fin String name, fin Goo gooParent) { ... }
>      String gooGoal(fin x) {
>          fin y = 2*x
>          fin int z = x + y
>      }
> }
> 
> Cheers,
> mg
> 
> 
> 


Re: fin

Posted by Paul King <pa...@asert.com.au>.
I am probably -1 right now on a new keyword when I think the existing one
works just fine.

One reason some Groovy folks might not use final more frequently is because
it has
historically (up until 2.4.x) been ignored by Groovy for local variables.
Java
also ignores final at runtime for local variables but that doesn't matter
for a statically
compiled language. Have a look at the bytecode using javap -v from this
Java program:

public class Hello {
public void method1() {
final Object o1 = new Object();
}
public void method2() {
Object o2 = new Object();
}
}

You will notice that the bytecode for method1 and method2 is identical.
Groovy 2.5 does a better job of detecting final for local variables. It
does it
in a similar sort of way to Java - at compile time. I'd be inclined to wait
and
see how this added support (plus @AutoFinal) affects usage.

The other discussions I have seen around not using final are around style.
The 'final' modifier is particularly good at stopping the practice of
mutating some
variable mid-way through a long method in a confusing way. Agile practices
discourage long methods, functional style discourages mutating variables
and codenarc can be used to some extent to catch bad behavior. So some
advocate omitting the final keyword but coding as if it was there to obtain
more succinct, easier to read code. Now that we have @AutoFinal, I am
not sure that we need to aggressively further promote its usage but rather
watch how usage changes in the short term.

Cheers, Paul.


On Sun, Jul 22, 2018 at 7:50 AM MG <mg...@arscreat.com> wrote:

> Hi guys,
>
> I have been wondering for a while whether Groovy developers use "def"
> even if a variable is actually is "final" not only because every Groovy
> example code uses "def", but also because "final" as a word is longer
> than "def".
> Therefore I propose to introduce the shortcut "fin" for "final" in Groovy.
>
> e.g. to support
>
> class Goo {
>      fin String name
>      fin Goo gooParent
>      Goo(fin String name, fin Goo gooParent) { ... }
>      String gooGoal(fin x) {
>          fin y = 2*x
>          fin int z = x + y
>      }
> }
>
> Cheers,
> mg
>
>
>
>

Re: fin

Posted by Konstantin Boudnik <co...@apache.org>.
+1 was in reply to Russel's objection.
--
  With regards,
Konstantin (Cos) Boudnik
2CAC 8312 4870 D885 8616  6115 220F 6980 1F27 E622

Disclaimer: Opinions expressed in this email are those of the author,
and do not necessarily represent the views of any company the author
might be affiliated with at the moment of writing.


On Sun, Jul 22, 2018 at 7:24 PM, Andres Almiray <aa...@gmail.com> wrote:
> -1 There’s no need for such a keyword. You don’t get much by skipping “al” from “final” instead we inherit a lot of trouble with yet another way to define variables/arguments/return types.
>
> Sent from my primitive Tricorder
>
>> On 22 Jul 2018, at 17:33, Konstantin Boudnik <co...@apache.org> wrote:
>>
>> +1 There was APL once ;)
>> --
>>  With regards,
>> Konstantin (Cos) Boudnik
>> 2CAC 8312 4870 D885 8616  6115 220F 6980 1F27 E622
>>
>> Disclaimer: Opinions expressed in this email are those of the author,
>> and do not necessarily represent the views of any company the author
>> might be affiliated with at the moment of writing.
>>
>>
>>> On Sun, Jul 22, 2018 at 2:19 PM, Russel Winder <ru...@winder.org.uk> wrote:
>>>> On Sat, 2018-07-21 at 23:50 +0200, MG wrote:
>>>> Hi guys,
>>>>
>>>> I have been wondering for a while whether Groovy developers use
>>>> "def"
>>>> even if a variable is actually is "final" not only because every
>>>> Groovy
>>>> example code uses "def", but also because "final" as a word is
>>>> longer
>>>> than "def".
>>>> Therefore I propose to introduce the shortcut "fin" for "final" in
>>>> Groovy.
>>>
>>> Please don't.
>>>
>>> final is just fine as it is.
>>>
>>>> e.g. to support
>>>>
>>>> class Goo {
>>>>     fin String name
>>>>     fin Goo gooParent
>>>>     Goo(fin String name, fin Goo gooParent) { ... }
>>>>     String gooGoal(fin x) {
>>>>         fin y = 2*x
>>>>         fin int z = x + y
>>>>     }
>>>> }
>>>>
>>>> Cheers,
>>>> mg
>>>
>>> 1,$s/fin/final/g
>>>
>>>>
>>>>
>>> --
>>> Russel.
>>> ===========================================
>>> Dr Russel Winder      t: +44 20 7585 2200
>>> 41 Buckmaster Road    m: +44 7770 465 077
>>> London SW11 1EN, UK   w: www.russel.org.uk

Re: fin

Posted by Andres Almiray <aa...@gmail.com>.
-1 There’s no need for such a keyword. You don’t get much by skipping “al” from “final” instead we inherit a lot of trouble with yet another way to define variables/arguments/return types. 

Sent from my primitive Tricorder

> On 22 Jul 2018, at 17:33, Konstantin Boudnik <co...@apache.org> wrote:
> 
> +1 There was APL once ;)
> --
>  With regards,
> Konstantin (Cos) Boudnik
> 2CAC 8312 4870 D885 8616  6115 220F 6980 1F27 E622
> 
> Disclaimer: Opinions expressed in this email are those of the author,
> and do not necessarily represent the views of any company the author
> might be affiliated with at the moment of writing.
> 
> 
>> On Sun, Jul 22, 2018 at 2:19 PM, Russel Winder <ru...@winder.org.uk> wrote:
>>> On Sat, 2018-07-21 at 23:50 +0200, MG wrote:
>>> Hi guys,
>>> 
>>> I have been wondering for a while whether Groovy developers use
>>> "def"
>>> even if a variable is actually is "final" not only because every
>>> Groovy
>>> example code uses "def", but also because "final" as a word is
>>> longer
>>> than "def".
>>> Therefore I propose to introduce the shortcut "fin" for "final" in
>>> Groovy.
>> 
>> Please don't.
>> 
>> final is just fine as it is.
>> 
>>> e.g. to support
>>> 
>>> class Goo {
>>>     fin String name
>>>     fin Goo gooParent
>>>     Goo(fin String name, fin Goo gooParent) { ... }
>>>     String gooGoal(fin x) {
>>>         fin y = 2*x
>>>         fin int z = x + y
>>>     }
>>> }
>>> 
>>> Cheers,
>>> mg
>> 
>> 1,$s/fin/final/g
>> 
>>> 
>>> 
>> --
>> Russel.
>> ===========================================
>> Dr Russel Winder      t: +44 20 7585 2200
>> 41 Buckmaster Road    m: +44 7770 465 077
>> London SW11 1EN, UK   w: www.russel.org.uk

Re: fin

Posted by Konstantin Boudnik <co...@apache.org>.
+1 There was APL once ;)
--
  With regards,
Konstantin (Cos) Boudnik
2CAC 8312 4870 D885 8616  6115 220F 6980 1F27 E622

Disclaimer: Opinions expressed in this email are those of the author,
and do not necessarily represent the views of any company the author
might be affiliated with at the moment of writing.


On Sun, Jul 22, 2018 at 2:19 PM, Russel Winder <ru...@winder.org.uk> wrote:
> On Sat, 2018-07-21 at 23:50 +0200, MG wrote:
>> Hi guys,
>>
>> I have been wondering for a while whether Groovy developers use
>> "def"
>> even if a variable is actually is "final" not only because every
>> Groovy
>> example code uses "def", but also because "final" as a word is
>> longer
>> than "def".
>> Therefore I propose to introduce the shortcut "fin" for "final" in
>> Groovy.
>
> Please don't.
>
> final is just fine as it is.
>
>> e.g. to support
>>
>> class Goo {
>>      fin String name
>>      fin Goo gooParent
>>      Goo(fin String name, fin Goo gooParent) { ... }
>>      String gooGoal(fin x) {
>>          fin y = 2*x
>>          fin int z = x + y
>>      }
>> }
>>
>> Cheers,
>> mg
>
> 1,$s/fin/final/g
>
>>
>>
> --
> Russel.
> ===========================================
> Dr Russel Winder      t: +44 20 7585 2200
> 41 Buckmaster Road    m: +44 7770 465 077
> London SW11 1EN, UK   w: www.russel.org.uk

Re: fin

Posted by Russel Winder <ru...@winder.org.uk>.
On Sat, 2018-07-21 at 23:50 +0200, MG wrote:
> Hi guys,
> 
> I have been wondering for a while whether Groovy developers use
> "def" 
> even if a variable is actually is "final" not only because every
> Groovy 
> example code uses "def", but also because "final" as a word is
> longer 
> than "def".
> Therefore I propose to introduce the shortcut "fin" for "final" in
> Groovy.

Please don't.

final is just fine as it is.

> e.g. to support
> 
> class Goo {
>      fin String name
>      fin Goo gooParent
>      Goo(fin String name, fin Goo gooParent) { ... }
>      String gooGoal(fin x) {
>          fin y = 2*x
>          fin int z = x + y
>      }
> }
> 
> Cheers,
> mg

1,$s/fin/final/g

> 
> 
-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

Re: fin

Posted by MG <mg...@arscreat.com>.
Hi 219,

I don't quite get that argument:

 1. People who don't know Groovy also don't know "def", so they ould
    just pick up "fin" at the same time as "def".
 2. They also don't know you can write "final" instead of "def" in
    Groovy (as someone pointed out before, "final" is solely a modifier
    in Java, and cannot be used as a type, as in Groovy).
 3. I don't see any examples usinf "final" now, so all new examples
    could use "fin".

Cheers,
mg


On 22.07.2018 01:03, J. David Beutel wrote:
> Personally, I don't think that having the "fin" keyword alternative 
> would be good.  I think it would discourage usage, as examples get 
> split between "fin" and "final", and people don't already know what 
> "fin" means.
>
> Cheers,
> 11011011
>
> On 07/21/2018 11:50 AM, MG wrote:
>> Hi guys,
>>
>> I have been wondering for a while whether Groovy developers use "def" 
>> even if a variable is actually is "final" not only because every 
>> Groovy example code uses "def", but also because "final" as a word is 
>> longer than "def".
>> Therefore I propose to introduce the shortcut "fin" for "final" in 
>> Groovy.
>>
>> e.g. to support
>>
>> class Goo {
>>     fin String name
>>     fin Goo gooParent
>>     Goo(fin String name, fin Goo gooParent) { ... }
>>     String gooGoal(fin x) {
>>         fin y = 2*x
>>         fin int z = x + y
>>     }
>> }
>>
>> Cheers,
>> mg
>>
>>
>>
>
>


Re: fin

Posted by "J. David Beutel" <li...@getsu.com>.
Personally, I don't think that having the "fin" keyword alternative 
would be good.  I think it would discourage usage, as examples get split 
between "fin" and "final", and people don't already know what "fin" means.

Cheers,
11011011

On 07/21/2018 11:50 AM, MG wrote:
> Hi guys,
>
> I have been wondering for a while whether Groovy developers use "def" 
> even if a variable is actually is "final" not only because every 
> Groovy example code uses "def", but also because "final" as a word is 
> longer than "def".
> Therefore I propose to introduce the shortcut "fin" for "final" in 
> Groovy.
>
> e.g. to support
>
> class Goo {
>     fin String name
>     fin Goo gooParent
>     Goo(fin String name, fin Goo gooParent) { ... }
>     String gooGoal(fin x) {
>         fin y = 2*x
>         fin int z = x + y
>     }
> }
>
> Cheers,
> mg
>
>
>