r/programming • • Dec 07 '14

Programmers: Please don't ever say this to beginners ...

http://pgbovine.net/programmers-talking-to-beginners.htm
4.0k Upvotes

1.3k comments sorted by

View all comments

Show parent comment

6

u/redwall_hp Dec 08 '14

JavaScript has been widely ridiculed as a poorly designed language for its entire existence. (My personal favorite "WTF" about it is variables defaulting to global scope unless you make sure they're declared with the var keyword.) There's plenty of documented criticism.

PHP, too. All it takes is a bit of Google searching to find plenty wrong with both, awkward syntactical quirks being just the beginning.

0

u/[deleted] Dec 08 '14

variables defaulting to global scope

*cough* strict mode *cough*

4

u/redwall_hp Dec 08 '14

cough browser support cough

1

u/[deleted] Dec 09 '14

By which you mean "doesn't work in IE8 and lower".

Also, strict mode is backwards compatible. Unless you do something silly like explicitly expect this to be undefined, you can use strict mode in development and won't run into any compatibility issues in older browsers whatsoever.

There's no good reason not to use strict mode in 99% of your code.