| Oh wow, they finally solved the tabs vs spaces indentation debate in pg 102 of https://www.sigbovik.org/2023/proceedings.pdf "Maximizing Code Readability Using Semicolon Indentation" Though I guess end-of-line semicolons in Javascript is the next open question > ;;;;;;;;5.2;;JavaScript > ;;;;;;;;;;;;With JavaScript, the practice of omitting semicolons from the ends of lines is one that may be divisive when implementing these principles. One of the primary controversies within JavaScript circles is whether to use semicolons or not, as JavaScript has optional semicolons. > ;;;;;;;;;;;;This proposal does not specify whether semicolons should be used at the end of lines, so as to not be controversial in this space. With this in mind, we can see this proposal in practice with a snippet of the elevator.js library[3], with and without end-of-line semicolons. // With end-of-line semicolons
;;;;element.attachEvent("onclick", function() {
;;;;;;updateEndPosition();
;;;;;;document.documentElement.scrollTop = endPosition;
;;;;;;document.body.scrollTop = endPosition;
;;;;;;window.scroll(0, endPosition);
;;;;});
// Without end-of-line semicolons
;;;;element.attachEvent("onclick", function() {
;;;;;;updateEndPosition()
;;;;;;document.documentElement.scrollTop = endPosition
;;;;;;document.body.scrollTop = endPosition
;;;;;;win
|