4 ms·
1. What's wrong with C#? 2. What made JS uniquely nice? I wanted to leave these questions entirely open to answer, but I'll add my own opinion on (2) because
by fastball 5y ago
1. What's wrong with C#?
2. What made JS uniquely nice?
I wanted to leave these questions entirely open to answer, but I'll add my own opinion on (2) because I feel compelled: nothing, JS is quite possibly the worst language ever designed. Certainly the worst in widespread use.
- zarzavat 5y agoWhy is JS one of the worst languages ever designed? I've used many languages and JS is one of the better designed ones in my opinion.
- tonyedgecombe 5y ago>Why is JS one of the worst languages ever designed? Implicit type conversions. Function scoping. Null and undefined, what is the difference? Accessing an undefined variable doesn't throw an exception. Assigning to an undefined variable without var puts it in the global scope. No integer type. I could go on and on. The only reason it has become successful is because it has a monopoly in the browser.
- mypalmike 5y agoMy favorite recent discovery is calling a js function with too many or too few parameters. It'll just go ahead and do it.
- phyrex 5y agoThere’s an implicit “arguments” function argument through which you can access the extra parameters. It’s JSs way of function overloading
- tonyedgecombe 5y agoWhich looks like an array but isn't.
- phyrex 5y agoThere’s a lot of that kind of thing in JS, isn’t there? :(
- handrous 5y agoI'd add - Actually using any of the distinguishing features of prototypical inheritance is nearly always a bad idea, which makes the use of that model in the first place very questionable. One of the cornerstones of the language is pretty much one big foot-gun, to be wholly avoided.
- mypalmike 5y agoWhat is [] + [] in JavaScript?
- regularfry 5y agoThere is the kernel of a nice idea in JS but so many bad early design decisions can never be walked back.
- eropple 5y agoI would argue that TypeScript does yeoman's work in doing much of that walking back. I plumb forgot that assigning a variable without `var` or `let` put it in the global scope because TypeScript yells at you for it.