Question: Do people actually read all this "physical mail spam". I assume they do, otherwise companies wouldn't bother us.
156 karma · joined June 8, 2012
barry.steyn at gmail
Question: Do people actually read all this "physical mail spam". I assume they do, otherwise companies wouldn't bother us.
I did not downvote your comment, but it is fundamentally incorrect. If your JavaScript program has been designed well, then asynchronisity by using an event driven model is the way to go. But that is very different to what I said about functions stopping the execution of the current function. This is true. For example
var func1 = function() { //Execute something here }
var func2 = function() { //Execute something here func1(); //Stop execution of this function, and rather execute func2 //Execute something here }
I hope the above explains this a bit better.
I do however intend to use an example similar to the one you have presented when I cover closures and scoping in JavaScript.
Scoping: Javascript uses C/Java notation but it does not have block scope, only function scope. That to me seems very misleading.
And with regards to `this`, the way function invocation sets `this` differs totally from method invocation. How can this not be a problem!
I just want to give you some feedbacks in the comments (I am the author of this article).
Firstly, with regards to the title, I did not read the newsguidlines document - I have submitted links in the way and style that other people did. For sure, in the future, I will follow these guidlines, but this must be a huge problem as lots of people do this.
Secondly, these are patterns (not language features). Yes, I was inspired by Douglas Crockford's book where he describes this as patterns. To me describing them as patterns makes sense: For instance, there is really nothing different about calling a method and a function. If you have to make a difference, then it is a pattern. And because putting new in front of a function also calls that function, it is in my mind a pattern. And in that sense, so is apply.
But I welcome the debate, and thanks for the constructive comments. I will take all these comments into consideration the next time I submit something.
I think responsive Web is really at its most powerful if the site is minimal (like google). For any advanced site, either lots of care needs to be taken or perhaps the dreaded "m" subdomain?