Twitter hasn’t been the most pleasant place over the last year. There has been large-scale trolling, much hurling of abuses, and even bans over inappropriate behaviour. But every now and then, Twitter ends up showing its kinder side – and the immense power it holds.
Paul Irish, who works on the Google Chrome team, sent out this tweet earlier today.
JavaScript question. Why is the return value of the variable declaration the previous statement's? #confused ? pic.twitter.com/cLd0DSvbgh
— Paul Irish (@paul_irish) January 9, 2017
Irish wanted to know why the JavaScript console behaves in a certain way. He is pretty big on Twitter, and has 210k followers. Replies soon started streaming in to his query with people chiming in with their thoughts.
@paul_irish Variable declaration hoisting?
— Anthony Ricaud (@rik24d) January 9, 2017
@paul_irish Variable hoisting is the culprit. This proves it: pic.twitter.com/CjGBTgEoKB
— Phil Dokas (@dokas) January 9, 2017
However, 7 minutes after Irish had posted his original tweet, he got a reply from one Brendan Eich. Brendan Eich also happens to be the creator of JavaScript.
@paul_irish It's not a return value, rather a statement completion value. Consider 'for(var x=42; false;);' which has no completion value.
— BrendanEich (@BrendanEich) January 9, 2017
Now there’s a lot of discussion and opinion on Twitter around programming, but nothing ends a debate like a response from someone who created the language. Turns out all the initial responders were wrong, and Eich had provided a reason why JavaScript behaves that way.
@_ajm hahhaa true. but so far 100% of everyone not named Brendan Eich is wrong. 🙂
— Paul Irish (@paul_irish) January 9, 2017
Now Brendan Eich isn’t exactly trawling Twitter for queries that he can help with – he also cofounded Mozilla, and is currently the CEO of Brave Software, a startup that aims to make the internet safer and more secure. But the fact that he took time out to answer to a user query is just how the tech community works. More often than not, people are willing to help out fellow developers, no matter how big or important they are. And while the rest of Twitter is busy dealing with political correctness, the alt-right, and discussions over whether Donald Trump really mocked a disabled reporter, it’s nice to see some communities are still using Twitter the way it was always meant to be used.