7 ms·
Indenting by two spaces is new to me. As a PHP programmer, an inserted tab (not converted to spaces) is the length of four spaces. Is the two-space indentation
by mise 15y ago
Indenting by two spaces is new to me. As a PHP programmer, an inserted tab (not converted to spaces) is the length of four spaces.
Is the two-space indentation relatively new? Or has it always been seen around in the JS community?
- dspillett 15y agoI've always been a four-spaces man, even in Javascript, and that seems quite common. Javascript uses in an event driven environment (like a browser of node.js) can encourage some pretty deep nesting so perhaps people use smaller indentation granularity for that reason.
- themanr 15y agoTwo spaces are the norm for ruby development but it seems fairly new in javascript.
- obayesshelton 15y agoNot in all cases, some IDE's or text editors have more space for a tab.
- tomjen3 15y agoThat is common in the Common Lisp and Scheme communities. So it is actually really old.