4 ms·
Interesting that he had promises in node that early. Maybe if he kept them, the community wouldn’t had standardized on two space indents Edit: so two space ind
by emehrkay 8y ago
Interesting that he had promises in node that early. Maybe if he kept them, the community wouldn’t had standardized on two space indents
Edit: so two space indents weren’t a consequence of “callback hell” ?
- abiox 8y agoi could see nested callbacks favoring two spaces, but overall it's not a style unique to javascript. for example, a lot of ruby i've seen (admittedly it's been a while) used two spaces, and i don't recall it being any more prone to deeply nested code than other languages. that said js code tends to be rendered in a variety of other places like browser dev tools, which may influence this as well.
- jessaustin 8y agoAfter getting used to 2 spaces in js I try to use them everywhere now. Except python, which obviously must be 4 spaces...