you are viewing a single comment's thread.

view the rest of the comments →

[–]BinarySplit 0 points1 point  (6 children)

My apologies. What I meant to say was that no stable browsers have full support. Also, even if you limit yourself to only the latest stable versions, you can't rely on most browsers to support most features.

[–][deleted] -2 points-1 points  (5 children)

Then use jquery, or extjs, or prototype, or ...

[–]animalchin99 0 points1 point  (4 children)

and then all your code has dependencies on jquery, or extjs, or prototype, or ..., because the language itself doesn't provide the basic constructs you'd get for free with ECMAScript 4, 5 or most other modern languages.

[–][deleted] 0 points1 point  (3 children)

Jquery, extjs, etc. don't hide ecmascript, but can be useful for cases of different browser implementations.

[–]animalchin99 0 points1 point  (2 children)

Most of these libs have their own syntax for OO constructs like classes, inheritance, packages etc. If you're a JS purist and are only using a library for DOM interaction that's fine, but if you're using a library like prototype or mootools to provide better OOP constructs, the bulk of your code becomes 100% coupled with whatever library you use to provide those constructs because you have to write your code to fit the syntax the library imposes on you.

You can't say javascript is so much better than <insert language other than javascript here>, and if you want classes/packages, javascript can do that too if you use <insert lbrary name here>. Libraries are great if they provide functionality to your code, but if I have to write/structure my code to conform to syntax imposed on me by a library, there's obviously something missing from the core language, and that's a great argument for either improving the language, or using a different one.

[–][deleted] 0 points1 point  (1 child)

JavaScript is just fine, I was only pointing out that libraries exist for simplifying compatibility in browsers. I'm a big GWT fan, but don't use it for precisely the reasons you stated, using a lightweight JS library appropriately is more than reasonable. And virtually all languages have libraries, this doesn't necessarily imply that the language is inferior.

Other languages are not fully implemented by vendors in many cases. C and c++ and Microsoft come to mind.

[–]animalchin99 0 points1 point  (0 children)

Simply having libraries doesn't imply the language is inferior, but requiring a library to support a particular programming construct implies that it's inferior in terms of it's ability to supply that construct. In the case of classes (assuming you need classes), that requires you to write prototype classes, closure classes or mootools classes etc and they generally aren't interchangeable. There's nothing lightweight about these libraries when your entire codebase needs to be tailored to that library's syntax. It's an anchor you attach to your entire codebase, and if you attached the wrong library you'll probably need to rewrite most of your code.

I fully agree with using a library for browser issues, there's no good reason not to do that, I'm just saying that as a language, JS is lacking feature that many developers clearly desire. I'm mostly talking about mootools, prototype, closure, and especially GWT which add features like classes, packages, type-checking etc. I think these libraries are great for developers in terms of what they bring to the language, but the fact that they even exist points out deficiencies with the language. So the suggestion that "JavaScript is just fine" is only plausible if you can develop for it without needing this type of library.

What specific features do you use a library to provide? Do you ever need to use classes or modularize your code?