Skip to content

The statement "Javascript is an asynchronous language" is simply not true#60

Merged
heapwolf merged 2 commits into
nodejitsu:masterfrom
wookiehangover:patch-1
Oct 10, 2011
Merged

The statement "Javascript is an asynchronous language" is simply not true#60
heapwolf merged 2 commits into
nodejitsu:masterfrom
wookiehangover:patch-1

Conversation

@wookiehangover
Copy link
Copy Markdown
Contributor

The statement "Javascript is an asynchronous language" is simply not true. Javascript is blocking in nature; it's Node that supplies the asynchronicity.

…true. Javascript is blocking in nature; it's Node that supplies the asynchronicity.
@Marak
Copy link
Copy Markdown
Contributor

Marak commented Oct 9, 2011

Yeah, that sentence is wrong, we should fix it.

It really should state that JavaScript is a synchronous language that executes in an event loop. The asynchronous part comes into play when you use a callback with some non-blocking input / output ( like node or a GUI )

@heapwolf
Copy link
Copy Markdown

"The statement "Javascript is an asynchronous language" is simply not true. Javascript is blocking in nature; it's Node that supplies the asynchronicity."

This statement is also not accurate, but requires clarification. Javascript has many scenarios in which it can produce asynchronous behaviors. In Javascript, an asynchronous programming event occurs independently of the main program flow. Asynchronous style programming allows the main program flow to continue processing, usually passing the belated instructions as a value. see Continuation Passing Style. In javascript, async programming was first popularized by AJAX, but prior to that was common, for example in the timer model. Nodejs has two layers of async events, in Javascript and between Javascript and the C++ bindings. @Marak draws a very good analogy between the browser and Nodejs with event loops and I/O. I'd love to see an update which includes some variation of marak's remarks.

@heapwolf heapwolf closed this Oct 10, 2011
@wookiehangover
Copy link
Copy Markdown
Contributor Author

Sorry, but did you read the requested change, or stop immediately when you disagreed with my comment on the commit? How about we discuss the edit, instead:

"Node enforces an ansynchronous coding style [...]"

Since we're not here to debate the relative merits of my commit message, but rather to correct something that is grossly inaccurate, I think its a bit extreme to close this issue as if its resolved.

@heapwolf
Copy link
Copy Markdown

Technically, nodejs does not enforce an asynchronous coding style, the culture surrounding nodejs enforces an an asynchronous coding style. A better edit might be "Nodejs promotes an asynchronous coding style from the ground up". I think this pull request can be closed, but you're absolutely correct to take issue with the statement made here, it's confusing and inaccurate. Thank you for taking the time to raise this issue!

@gerred
Copy link
Copy Markdown

gerred commented Oct 10, 2011

Can we reopen this then and have a new pull request for it? Seems to make sense we should fix it in the context of this issue/conversation rather than open a new pull request, unless you have other plans.

@wookiehangover
Copy link
Copy Markdown
Contributor Author

ya, can we re-open this? when an issue is closed there's no way to add more commits to help resolve the issue. Here's my updated edit:

https://github.com/wookiehangover/docs/commit/5582d4c2d625b22907b58239da92ec9a2c5d8a01

@heapwolf heapwolf reopened this Oct 10, 2011
… of "synchronous" languages in favor of a broader statement about "popular web frameworks."
heapwolf pushed a commit that referenced this pull request Oct 10, 2011
The statement "Javascript is an asynchronous language" is simply not true
@heapwolf heapwolf merged commit e5f35c3 into nodejitsu:master Oct 10, 2011
@wookiehangover
Copy link
Copy Markdown
Contributor Author

thanks for the merge!

@heapwolf
Copy link
Copy Markdown

no thank you for paying attention to the details and speaking up when you saw something that needed correction! =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants