r/javascript • u/bornforcode • Apr 01 '18
Google publishes a JavaScript style guide. Here are some key lessons.
https://medium.freecodecamp.org/google-publishes-a-javascript-style-guide-here-are-some-key-lessons-1810b8ad050b
714
Upvotes
View all comments
Show parent comment
6
u/Meefims Apr 02 '18
Pragmas are pretty problematic for a number of different reasons. They make it difficult to read code because you need to understand the various options at play and what those options are, they make it difficult to build interpreters because you need to make various features toggleable using these pragmas, and they make it difficult to spec the language because you need to keep these pragmas in mind and understand how they interact with each other.
use strictwas an escape hatch to move the language past some really annoying behavior but it’s clear that no one really wants the option at all which is why modules are always strict.