| 
 | 
 | 
 Chromium Code Reviews
 Chromium Code Reviews Issue 
            2466263003:
    [StyleGuide] Allow const in JavaScript code  (Closed)
    
  
    Issue 
            2466263003:
    [StyleGuide] Allow const in JavaScript code  (Closed) 
  | Description[StyleGuide] Allow const in JavaScript code
This CL allows use of the const keyword in JavaScript code, after offline
discussion with benjhayden@ and charliea@.
BUG=catapult:#2833
Review-Url: https://codereview.chromium.org/2466263003
Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/3117a26ce459be98f34a94cf0437ad5e300c21e3
   Patch Set 1 #Patch Set 2 : shorten let wording, remove ConstCheck #
 Messages
    Total messages: 23 (9 generated)
     
 eakuefner@chromium.org changed reviewers: + benjhayden@chromium.org, charliea@chromium.org 
 PTAL. One thing I'm wondering about is whether it actually makes sense to hold adoption of `let` -- it may be that we should just allow it in this CL together with `const`. There's a concern about consistency but I think it's the same concern as for `const` or, say, classes, so I think my vote might actually be to allow it. Both keywords provide productivity improvements for developers. 
 On 2016/11/01 at 17:56:12, eakuefner wrote: > PTAL. One thing I'm wondering about is whether it actually makes sense to hold adoption of `let` -- it may be that we should just allow it in this CL together with `const`. There's a concern about consistency but I think it's the same concern as for `const` or, say, classes, so I think my vote might actually be to allow it. Both keywords provide productivity improvements for developers. lgtm to allow both `const` and `let`, or just `const` if Charlie has a reason to hold off on `let`. 
 I think what's important here is that we have a strategy for what we want to encourage people to do. I think `const` is a little easier because there aren't as many constants, and we can just tell people, "Hey, instead of var X_Y_Z = 0, use const X_Y_Z = 0;", and that recommendation is pretty constrained. Are we allowing people to use `let` but not recommending it? Are we recommending it for new code, but not recommending it as people touch old code? Are we requiring conversion for any code that people are touching? I think my vote is for the second option, but I can see arguments for a lot of them, and I think it's important that we have a plan before we allow this. 
 On 2016/11/01 at 19:32:37, charliea wrote: > I think what's important here is that we have a strategy for what we want to encourage people to do. > > I think `const` is a little easier because there aren't as many constants, and we can just tell people, "Hey, instead of var X_Y_Z = 0, use const X_Y_Z = 0;", and that recommendation is pretty constrained. > > Are we allowing people to use `let` but not recommending it? Are we recommending it for new code, but not recommending it as people touch old code? Are we requiring conversion for any code that people are touching? I think my vote is for the second option, but I can see arguments for a lot of them, and I think it's important that we have a plan before we allow this. Should this cl remove ConstCheck? https://github.com/catapult-project/catapult/blob/e1b701cbabeeac404049a83ffcc... 
 On 2016/11/01 at 21:42:20, benjhayden wrote: > On 2016/11/01 at 19:32:37, charliea wrote: > > I think what's important here is that we have a strategy for what we want to encourage people to do. > > > > I think `const` is a little easier because there aren't as many constants, and we can just tell people, "Hey, instead of var X_Y_Z = 0, use const X_Y_Z = 0;", and that recommendation is pretty constrained. > > > > Are we allowing people to use `let` but not recommending it? Are we recommending it for new code, but not recommending it as people touch old code? Are we requiring conversion for any code that people are touching? I think my vote is for the second option, but I can see arguments for a lot of them, and I think it's important that we have a plan before we allow this. > > Should this cl remove ConstCheck? > https://github.com/catapult-project/catapult/blob/e1b701cbabeeac404049a83ffcc... ping :-) 
 On 2016/11/01 at 21:42:20, benjhayden wrote: > On 2016/11/01 at 19:32:37, charliea wrote: > > I think what's important here is that we have a strategy for what we want to encourage people to do. > > > > I think `const` is a little easier because there aren't as many constants, and we can just tell people, "Hey, instead of var X_Y_Z = 0, use const X_Y_Z = 0;", and that recommendation is pretty constrained. > > > > Are we allowing people to use `let` but not recommending it? Are we recommending it for new code, but not recommending it as people touch old code? Are we requiring conversion for any code that people are touching? I think my vote is for the second option, but I can see arguments for a lot of them, and I think it's important that we have a plan before we allow this. > > Should this cl remove ConstCheck? > https://github.com/catapult-project/catapult/blob/e1b701cbabeeac404049a83ffcc... Yes. Coming back to this CL; will land by EOW. 
 Description was changed from ========== [StyleGuide] Allow const in JavaScript code This CL allows use of the const keyword in JavaScript code, after offline discussion with benjhayden@ and charliea@. ========== to ========== [StyleGuide] Allow const in JavaScript code This CL allows use of the const keyword in JavaScript code, after offline discussion with benjhayden@ and charliea@. BUG=catapult:#2833 ========== 
 On 2016/11/01 at 21:42:20, benjhayden wrote: > On 2016/11/01 at 19:32:37, charliea wrote: > > I think what's important here is that we have a strategy for what we want to encourage people to do. > > > > I think `const` is a little easier because there aren't as many constants, and we can just tell people, "Hey, instead of var X_Y_Z = 0, use const X_Y_Z = 0;", and that recommendation is pretty constrained. > > > > Are we allowing people to use `let` but not recommending it? Are we recommending it for new code, but not recommending it as people touch old code? Are we requiring conversion for any code that people are touching? I think my vote is for the second option, but I can see arguments for a lot of them, and I think it's important that we have a plan before we allow this. > > Should this cl remove ConstCheck? > https://github.com/catapult-project/catapult/blob/e1b701cbabeeac404049a83ffcc... Done. 
 I will continue the 'let' discussion in a followup CL. 
 The CQ bit was checked by eakuefner@chromium.org 
 The patchset sent to the CQ was uploaded after l-g-t-m from benjhayden@chromium.org Link to the patchset: https://codereview.chromium.org/2466263003/#ps20001 (title: "shorten let wording, remove ConstCheck") 
 CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... 
 The CQ bit was unchecked by commit-bot@chromium.org 
 Try jobs failed on following builders: Catapult Presubmit on master.tryserver.client.catapult (JOB_FAILED, https://build.chromium.org/p/tryserver.client.catapult/builders/Catapult%20Pr...) 
 eakuefner@chromium.org changed reviewers: + sullivan@chromium.org 
 +sullivan for catapult_build/js_checks.py 
 lgtm 
 The CQ bit was checked by eakuefner@chromium.org 
 CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... 
 CQ is committing da patch.
Bot data: {"patchset_id": 20001, "attempt_start_ts": 1484002166893840,
"parent_rev": "886ff596e4884a69b7977a6929165e239955ae5b", "commit_rev":
"3117a26ce459be98f34a94cf0437ad5e300c21e3"}
 
            
              
                Message was sent while issue was closed.
              
            
             Description was changed from ========== [StyleGuide] Allow const in JavaScript code This CL allows use of the const keyword in JavaScript code, after offline discussion with benjhayden@ and charliea@. BUG=catapult:#2833 ========== to ========== [StyleGuide] Allow const in JavaScript code This CL allows use of the const keyword in JavaScript code, after offline discussion with benjhayden@ and charliea@. BUG=catapult:#2833 Review-Url: https://codereview.chromium.org/2466263003 Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapu... ========== 
 
            
              
                Message was sent while issue was closed.
              
            
             Committed patchset #2 (id:20001) as https://chromium.googlesource.com/external/github.com/catapult-project/catapu... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
