-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
their variable declarations all line up. I don't consider that compelling.
For one thing, it would only line up variables declared using def. String,
Integer, Book, List<String> etc would not line up. So what would actually
be achieved?

If you really need them to line up, how about introducing whitespace
between the two words? Although non-standard, that doesn't require language
changes, and will also work for String, Integer, etc.

However if this proposal does go ahead, please, please, please don't use
let. MG provided a good list of reasons in a separate email.

Cheers,
Anne.





On Wed, 29 Apr 2020 at 12:24, mojo2012 <meister.fu...@gmail.com> wrote:

> 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 think that
> this is the way to go.
>
> 3. I'm also fine with "fin" as I more care about the alignment (and
> therefore "optical consistency") than the actual letters to type :-D.
> Although it is rather uncommon choice :-D
> Personally, I'd even go a little farther and deprecate "def name" and
> "final
> name" in favour of their java counterparts. I never quite liked these
> keywords (no offence) - although I know that this would break almost all
> legacy code.
>
> Anyway, the idea to make it more java compatible sound good to me. To sum
> up
> you are suggesting that:
> * def is unchanged
> * final var/final def = fin/val/let -> changed to work like the java way
>
> Cheers,
> Matti
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Phone: (03) 9585 6788
Fax: (03) 9585 1086
Web: https://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au

Reply via email to