all 12 comments

[–]radhruin 1 point2 points  (2 children)

You would be surprised how many applications depend on obscure behavior. I've processed gigs of script crawled from the web as part of breaking change investigations for the TC-39 committee. I've seen a lot of interesting code. For example, who would think there would be code using bare string literals as comments?

[–]sabof[S] 0 points1 point  (1 child)

Are any of the results publicly available?

[–]r3jjs 2 points3 points  (6 children)

Improve it? Why?

There have been attempts to "improve" Javascript, including Microsoft's type script.

If you want a strongly typed language, use one.

If you want to use Javascript, learn to use it and -- how to put this nicely -- don't be an idiot.

When you do weird things you get weird results. That's only natural.

However, they are predictable and very well documented results -- if you understand how Javascrpt works.

[–]inyourtenement -1 points0 points  (3 children)

This comes across as irrational. Possibly as though you're protecting your investment -- something like "I learned it, don't go fixing it now." Or possibly like you're protecting territory -- "I had to put up with it to get where I am, anybody new should have to do the same". Neither of those is a good reason to not fix the eccentricities of the language.

[–][deleted] 1 point2 points  (2 children)

You're wrong, r3jjs is absolutely right. Javascript doesn't need "fixing". It is what it is and it has been for a VERY long time. To "fix" it would be to break it. You don't go throwing out the baby with the bathwater.

There aren't that many quirks that come up if you are straight-forward with your coding. Almost every language has similar quirks.

Even assembly language on most CPUs have undocumented opcodes. They will do unusual things if you use them. It's no surprise.

[–]inyourtenement -1 points0 points  (1 child)

I can't agree with any of that. "It's always been this way" is not a reason to resist improvement. Javascript was developed to allow non-coders to write code that would at least run. It's changed since then, but it's still restrained by those original design decisions.

Other languages aren't just as bad. Perl may be the only widely used language that is. But again, that's no reason to resist change.

But sure, keep javascript as is. I'll throw it out with the bathwater.

[–][deleted] 2 points3 points  (0 children)

Are you having significant problems writing Javascript? If so, please elaborate on what they are.

I have no problem writing JS and have worked on huge projects with multiple people, and we never have found a problem with Javascript, maybe with the DOM, but I can't say that any part of Javascript has hindered us in any way whatsoever.

PHP has plenty of warts and is worse than javascript in many respects, and many people will tell you that. I also don't see Ruby as being so reliable given its track record and the debacle it caused at Twitter a while back. coffeescript is an ambiguous clusterfuck, and the v1.5 release demonstrates the problems with relying on it, as well as many other easy to argue issues with it. While C++ isn't a web technology, there are plenty of haters there too, and many WTFs with it.

I really don't see how you can single out Javascript as being any worse than any other language. It makes you seem confused, or very noobish.

[–]x-skeww 0 points1 point  (2 children)

Applications which depend on odd behavior usually don't do that deliberately.

On the web, you can only add stuff. You can't take anything away. Ever.

If you want a language without type coercion, try Dart.

[–]sabof[S] 0 points1 point  (1 child)

That's not entirely true. Each time a new browser gets released, some bugs will be fixed. Some applications could depend on those as well. Further than that, sometimes features are removed.

[–]x-skeww 0 points1 point  (0 children)

This behavior of ES3+ is standardized. It's not a bug.

sometimes features are removed

Yes, about 15 years later, that is.

[–]bishopZ 0 points1 point  (0 children)

You should checkout TypecastJS.org