[tbb-bugs] #26184 [Applications/Tor Browser]: Think about using `const` as much as possible in Torbutton code

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Nov 19 15:05:34 UTC 2019


#26184: Think about using `const` as much as possible in Torbutton code
-------------------------------------------------+-------------------------
 Reporter:  gk                                   |          Owner:  tbb-
                                                 |  team
     Type:  task                                 |         Status:  new
 Priority:  Medium                               |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tbb-torbutton, TorBrowserTeam202001  |  Actual Points:
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by sysrqb):

 * keywords:  tbb-torbutton => tbb-torbutton, TorBrowserTeam202001


Comment:

 Putting this on the roadmap in the not-too-distant-future. I did not read
 the articles, but I appreciate the comments. We should think about
 documenting all of our coding standards (C/C++, Javascript, Java, Kotlin,
 etc). We can look at tor's for a starting point, as well:
 https://gitweb.torproject.org/tor.git/tree/doc/HACKING/CodingStandards.md
 https://gitweb.torproject.org/tor.git/tree/doc/HACKING/CodingStandardsRust.md

 I am generally very supportive of maintaining readable code that is
 explicit about which variable bindings may change within scope. Self-
 documenting code is especially advantageous.

 Mozilla are not explicit about when `const` vs. `let` should be used in
 their documentation:
 https://developer.mozilla.org/en-
 US/docs/Mozilla/Developer_guide/Coding_Style#JavaScript_practices

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26184#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list