You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2020/04/27 19:29:30 UTC

[GitHub] [groovy] mojo2012 opened a new pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

mojo2012 opened a new pull request #1236:
URL: https://github.com/apache/groovy/pull/1236


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] mojo2012 commented on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
mojo2012 commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620576743


   I subscribed through nabble, didn't that work? Can you also point me into the direction of that slack channel? I registered here a while ago: https://groovycommunity.com/ 
   But didn't actually get any notification form there.
   
   Yes help is very much appreciated :-) I'd love to help to make groovy even better.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] danielsun1106 commented on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620316066


   Out of curiosity, why do we need two similar new keywords `val` and `let`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] paulk-asert edited a comment on pull request #1236: [GROOVY-9308] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
paulk-asert edited a comment on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-625201459


   I think the use of "let" wasn't widely supported. The use of "val" as an alternative to "final var" had more support but certainly not universal. I think we might look again at "val" at some point in the future. For now, I think there are still some improvements we are wanting to make wrt final anyway which we should make in the meantime.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] paulk-asert commented on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
paulk-asert commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620267220


   Relates to GROOVY-9308


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] paulk-asert commented on pull request #1236: [GROOVY-9308] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
paulk-asert commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620578209


   Just here as far as I know: https://groovy-community.slack.com/


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] paulk-asert commented on pull request #1236: [GROOVY-9308] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
paulk-asert commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-625201459


   I think the use of "let" wasn't widely liked. The use of "val" as an alternative to "final var" had more support but certainly not universal. I think we might look again at "val" at some point in the future. For now, I think there are still some improvements we are wanting to make wrt final anyway which we should make in the meantime.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] mojo2012 commented on pull request #1236: [GROOVY-9308] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
mojo2012 commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-623920223


   I think the feature request has been denied, so we can close this PR


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] danielsun1106 commented on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620416264


   Understood. I mean we can choose one of the two new keywords, `val` or `let`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] mojo2012 edited a comment on pull request #1236: [GROOVY-9308] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
mojo2012 edited a comment on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620580636


   It says a workspace admin has to invite me (meister dot fuchs AT gmail com)
   Thanks, I'm in :-)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] paulk-asert commented on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
paulk-asert commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620576965


   Also, you might want to edit the PR title to say GROOVY-9308 instead of GROOVY-9364


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] danielsun1106 commented on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620423590


   Also, a thread about the new feature should be started at dev mailing list:
   http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
   
   When we get three +1 from PMC, the feature can be included in Groovy. This is the Apache rule, we should obey it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] mojo2012 commented on pull request #1236: [GROOVY-9308] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
mojo2012 commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620580636


   It says a workspace admin has to invite me (meister dot fuchs AT gmail com)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] mojo2012 commented on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
mojo2012 commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620420747


   I personally prefer val, but some people might argue that let is easier to distinguish  from var. so I‘m fine with let too here.
   
   Too finish the feature though I would need some help of you guys to figure out how to make ‚final let‘ a syntax error.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] paulk-asert commented on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
paulk-asert commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620575048


   Seems like you aren't subscribed to the dev mailing list, so your email hit moderation - it helps us avoid lots of spam. I passed it through but if you subscribe, you will see your messages turn up quicker. Also, while email is preferred for official discussions, there is also the "feature-ideas" slack channel if you just want to brain storm ideas. If we do go ahead, we'll make this an official GEP (Groovy enhancement proposal). We can help with getting that done.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] mojo2012 commented on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
mojo2012 commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620567260


   I created a post on the mailing list. Let's wait for the feedback :-)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] mojo2012 commented on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
mojo2012 commented on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620386906


   When initializing a lot of variables it is way more readable to have them properly aligned like this:
   
   ```groovy
   var testObject = ...
   val webClient = ...
   var nextObject = ...
   ```
   
   instead of:
   ```
   groovy
   var testObject = ...
   final var webClient = ...
   var nextObject = ...
   ```
   
   I remember mentioning Brian Goetz that as one of the main reasons that make `var` so nice to use.
   
   Obviously none uses final variables these days anymore, or why did the java team not think about that :-D


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] mojo2012 edited a comment on pull request #1236: [GROOVY-9364] Added "final var" shortcut keywords "let" and "val"

Posted by GitBox <gi...@apache.org>.
mojo2012 edited a comment on pull request #1236:
URL: https://github.com/apache/groovy/pull/1236#issuecomment-620420747


   I personally prefer val, but some people might argue that let is easier to distinguish  from var. so I‘m fine with let too here.
   
   To finish the feature though I would need some help of you guys to figure out how to make ‚final let‘ a syntax error.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org