Live data from Hacker News

JavaScript: The Right Way

jstherightway.org

101–110 of 136 posts

Re: JavaScript: The Right Way

#101
post #22

"JavaScript has strong object-oriented programming capabilities" What would be an example of a language with weaker OOP capabilities? PS: "The bad parts" section did not fit the page?

> What would be an example of a language with weaker OOP capabilities? Something without the concept of objects built in? C?

That's absent OOP capabilities.

Re: JavaScript: The Right Way

#105
It would be nice to see the browser versions supported by all these projects in one place... this simplifies the process of elimination for those who have to support older browsers.

Re: JavaScript: The Right Way

#107
post #88
post #58

Earlier quoted context omitted.

and underscore. not for DOM, but for some functional compatibility (map, forEach, etc). Plus, it's convenience methods quickly become indispensable. _(fn).bind(this), anyone?

Uh oh, I've been using fn.bind(this) everywhere. Is there a linter that will warn me when I'm not using cross-browser supported js?

it's called IE7. Any feature that's not cross browser supported is guaranteed to not be supported in IE7. A.K.A. lowest common denominator.

Very soon to be IE8.

Re: JavaScript: The Right Way

#108

Earlier quoted context omitted.

All of you are giving good advice but I just have to chuckle at how quickly you all proved OPs point.

Yeah this is one of the best examples of people proving a point by trying to disprove it I've ever seen. "The ecosystem isn't (that) confusing, just use X Y and Z" - "No, use X Y and A" -- "Who uses Y? Use C" Myth: confirmed!

Well, I wasn't trying to say it wasn't confusing. Just trying to reduce the confusion by picking a starter pack. It doesn't work if everyone else flinches and decides they have a better starter pack than me!

Re: JavaScript: The Right Way

#110
post #48

> "Different from C, C# and Java, JavaScript is an interpreted language. It means that it needs an "interpreter"." I have an issue with the above statement. There are no compiled or interpreted "languages". There are only implementations. There's nothing preventing someone from "compiling" it.

The distinction can very much exist in practice, depending on the existence and capabilities of production-quality implementations. While there have been attempts to compile a language like Python down to native code, they are still very limited and not useful in a practical sense. Hence, Python is a de facto interpreted language, since its usable implementations are implemented as interpreters. The same goes for Jav…

> The same goes for JavaScript today. Given that all of the usable implementations are interpreters, JavaScript can currently be considered an interpreted language.

This hasn't been true for quite some time. SpiderMonkey and JavaScriptCore do include interpreters, but only use them while code is first running. If a function gets hot, they then JIT compile the code. V8 has no interpreter at all, only JIT compilers (and is certainly usable and in wide use). And finally SpiderMonkey even just added an AOT compiler for compliant asm.js code (which, while a subset, is indeed valid JS code).

Post reply on HN