Re: [VOTE] Add a shorthand "final var" keyword

2020-05-02 Thread MG
Hi Matti, On 28/04/2020 19:29, mojo2012 wrote: 2. There are a lot of reasons to not have a variable declared as final (think about loops). Being forced to use another keyword to "un-final" the variable would break the sense of this whole discussion. And treating all local variables as final woul

Re: [VOTE] Add a shorthand "final var" keyword

2020-04-29 Thread Keith Suderman
-1 I agree with Anne and the others; I see no compelling use case for this. If making variable definitions line up is the goal then make your variable definitions line up... that is what whitespace was invented for. And I can't think of a single keyword (other than "final" or "const") that w

Re: [VOTE] Add a shorthand "final var" keyword

2020-04-29 Thread Mikko Värri
> On 28. Apr 2020, at 15.09, mojo2012 wrote: > > I'm looking forward to get some feedback from you (hopefully positive :-)) > > [ ] +1 Add either val or let as new shortcut for "final def"/"final var" > [ ] 0 I don't have a strong opinion about this, but I assume it's ok > [ ] -1 I don't lik

Re: [VOTE] Add a shorthand "final var" keyword

2020-04-28 Thread Anne
-1 Adding multiple keywords to achieve one result makes a language more difficult to read and to learn. I think there needs to be a very compelling reason to even seriously consider doing so. Unless I've misunderstood, in this case the reason is that someone wants a three character keyword so thei

Re: [VOTE] Add a shorthand "final var" keyword

2020-04-28 Thread mojo2012
Hey MG :-) 2. There are a lot of reasons to not have a variable declared as final (think about loops). Being forced to use another keyword to "un-final" the variable would break the sense of this whole discussion. And treating all local variables as final would pose a lot of issues too. I don't t

RE: [VOTE] Add a shorthand "final var" keyword

2020-04-28 Thread Milles, Eric (TR Tech, Content & Ops)
-1 vote from me We have "def x" and "var x" for non-final variables and we can use just "final x" for a one-time assignable variable. So there is already a sufficiently terse option available. -Original Message- From: mojo2012 Sent: Tuesday, April 28, 2020 7:10 AM To: d...@groovy.inc

Re: [VOTE] Add a shorthand "final var" keyword

2020-04-28 Thread MG
As an avid final user, I would vote +1 in principle, with the following caveats : -) 1. I am alas not fond of either the "val" or the "let" keyword (explanation upcoming). 2. Groovy has @AutoFinal (https://docs.groovy-lang.org/latest/html/gapi/groovy/transform/AutoFinal.html) - while w

Re: [VOTE] Add a shorthand "final var" keyword

2020-04-28 Thread Søren Berg Glasius
+1 I like the idea. Best regards / Med venlig hilsen, Søren Berg Glasius Hedevej 1, Gl. Rye, 8680 Ry, Denmark Mobile: +45 40 44 91 88, Skype: sbglasius --- Press ESC once to quit - twice to save the changes. Den tir. 28. apr. 2020 kl. 14.24 skrev mojo2012 : > Dear development community, > > I'