What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

What's the difference between JavaScript and Java?

First, thanks to the SE team for the recent changes in rep calculation for old deleted questions. That means this question is not about reputation, it's about content.

Due to the simplicity and popularity of this question, there are probably zillions of links to it on the internet. It's one of the top questions in a Google search for "java javascript difference". There are at least 20 other questions on SO that link to this one (according to the sidebar). I can't see any other question on SO which actually answers this question, because they all would have been closed as dupes of this one. Chris Jester-Young's answer is an excellent summary of the actual differences between the languages.

My flippant answer ("Car and Carpet") was apparently funny and got highly upvoted and accepted. Shog9's answer, same thing. Maybe it's just some answers that need to be deleted here, not the question as a whole?

Update: Question undeleted. Thanks everybody for helping to preserve content.

Update 2: I support the lock, this is a good application of the locking feature.

share|improve this question
2  
what about car shaped carpets? –  Nick Dandoulakis Mar 20 '12 at 19:26
2  
I don't think closing this question as "too localized" is the right approach. Yes, that question was un-deleted, but rather than people who disagree with the un-deleters just voting to delete it all over again, we should, you know, discuss it here on Meta. –  Cody Gray Mar 20 '12 at 19:27
    
@JeremyBanks: is SO now the jargon file? We won't miss that question, we really won't. –  user7116 Mar 20 '12 at 19:34
2  
About the only thing that question has that's worthwhile are some of the answers, but most of the answers are too "fluffy" to matter. At best, the good answers could be pulled out into the tag-wiki(s) for java and/or javascript, but as it stands, there's just way too much noise in there to be useful to keep around. –  cdeszaq Mar 20 '12 at 19:38
7  
Historical lock. It's a somewhat unconstructive question and you'll make the page worse if you remove the funny by deleting answers according to current standards. –  Jeremy Banks Mar 20 '12 at 19:41
2  
My vote is for historical lock. –  Robert Harvey Mar 20 '12 at 20:13
7  
The real question is why have we had to fight with the same moderator repeatedly just to have a discussion about a question. Not only have they interfered in the community's ability to close/reopen the question in question, but they're directly interfered in our ability to discuss whether that question should be closed or deleted. I thought we weren't going to do this anymore. I'd open up a new question about it, but I'm afraid it'd get closed. –  Cody Gray Mar 20 '12 at 20:13
1  
@Cody: Consensus on this question seems unlikely. How about we cage fight for it? –  Robert Harvey Mar 20 '12 at 20:15
    
@RobertHarvey - Wouldn't it need to be more like a "wizards duel", but wielding a compiler and vi instead of a wand and a pointy hat? –  cdeszaq Mar 20 '12 at 20:19
6  
@CodyGray a) Seriously, if you're going to do a call-out, actually call me out b) this post is about the deletion of the question. The community deleted it, and then it was undeleted. If you want to make the question about something more then that's fine, but this is about something that is limited to a specific period in time which is the very definition of "too localized". And on top of that, your reference was about deletions not closures. This conversation is not about closures. –  casperOne Mar 20 '12 at 20:30
2  
@Robert: I'm not asking for consensus, simply an opportunity for some discussion. Those who have strong opinions on the opposite side of that expressed by Greg should post defenses of those positions. That's the problem with closing the question, it prevents the whole process. And I tried to call that out here in the comments, assuming an oversight, and even got the question reopened. Then it was immediately closed again like a slap in the face, as if "you shouldn't bother discussing this, it's a moot point". Sorry, but that's not what the link I posted concludes. –  Cody Gray Mar 20 '12 at 22:08
1  
@Casper: I don't think calling out individuals by name is constructive. I figured you'd knew who you were and those who cared could find out for themselves. The focus, as shouldn't even need to be stated, wasn't on you. I think the general point is for moderators not to actively interfere in an ongoing community debate about historical posts. One could obviously feign ignorance, if they weren't involved in the original question and the meta one. Worse, my claim is that you shut down discourse by closing the meta question, discourse that was not yet unconstructive. –  Cody Gray Mar 20 '12 at 22:11
2  
@CodyGray: What? Nobody closed the question again. See Shog9's answer below. –  Robert Harvey Mar 20 '12 at 22:12
2  
@Robert: This question, the one on meta. Sorry, too many questions under discussion. Look at the history: it was closed as too localized, I advocated to reopen, then it was closed again. Yes, now it's open again; sorry, I took a short break. –  Cody Gray Mar 20 '12 at 22:15
1  
@casper: I don't know if I'm being unclear or you're intentionally obscuring the issue. My complaint about closing questions repeatedly refers to this question, the one on Meta that was closed as "too localized", even after being reopened. Sorry your feelings were hurt by my original comment. I still meant for the focus to be on the actions in general, not on you as a person. I don't think that's a pot-shot and that's why I intentionally didn't call out a name. I simply didn't feel the established protocol calling for less mod interference (the one I linked to originally) was being followed. –  Cody Gray Mar 21 '12 at 2:05
show 4 more comments

3 Answers

First off, thanks for bringing this up here. This is exactly how these older, controversial* questions should be handled. Discussion was mostly civil, focused on the merits of the various answers, and voting on SO itself served to illustrate the lack of clear consensus - the perfect recipe for a historical lock...

*I don't actually recall this being a particularly controversial in the past, but it has obviously stirred up some controversy recently.

For the past few weeks, I've been toying with various ideas for how we can help formalize the process for using the "historical significance" close reason. This lock reason is currently our test-bed for developing a strategy for archiving questions and their answers that should be preserved in some fashion, even if no longer needed or wanted as living Q&A on the site itself. Robert Cartaino had the idea of effectively eulogizing these - writing a short introduction that explains to future readers,

  1. Why they were asked and answered to begin with
  2. What gives them lasting value

I like this idea. If something is worth keeping, it should be possible to explain why - that's my primary motivation for asking that these posts be brought up for consideration here on Meta.

You and Adam come close to what I'm looking for. I would justify the importance of the question as follows:

Due to the simplicity and popularity of this question, there are probably zillions of links to it on The Internet. It's one of the top questions in a Google search for "java javascript difference". There are at least 20 other questions on SO that link to this one, either as a service to a confused asker or as duplicates.

Greg's pithy answer resolves in 11 words the essential point of confusion, Chris takes the question at face value, Shog preempts common uninformed criticisms of JavaScript while toolkit, ddaa, Bill and others provide insight into the history behind that language.

Both Java and JavaScript continue to evolve, their respective communities converging and diverging as the languages themselves are put to new uses. It's unlikely that this point of confusion and friction will be going away soon, and until it does this question and its answers will serve a useful purpose.

On a personal note, I was never particularly proud of my answer there, and certainly never expected it to last this long... I resisted the urge to delete it for three years because it provided me with a frequent reminder not to get too self-righteous when moderating other people's work.

share|improve this answer
    
I like the idea of a post-mortem in principle, but believe that the post notice, the post contents and the edit history (including the open/close/deletion history) really should be enough evidence, and I'm happy to explain those details to anyone who holds up the question as evidence that their question is OK. I want users to see the same wording in the post notice every time they visit one of these historical posts. –  Robert Harvey Mar 20 '12 at 22:09
    
@Robert: Would just a link in the post notice to the "defending" Meta question be overdoing it, to you? –  Josh Caswell Mar 20 '12 at 22:28
    
The post notice is computer generated. I'd add a comment linking this meta post, but it would require unlocking the question again, and I don't want to do that. –  Robert Harvey Mar 20 '12 at 23:04
    
I think the idea of a post-mortem thing (disclaimer, synopsis, road-map, etc.) is a fantastic idea for multiple reasons. 1.) It requires a bit of effort on the part of those who want it preserved 2.) It actually makes the question/answers more helpful, since it helps to cut through the crap and 3.) It is a clear indication that it is a "special" post and should not be emulated by current / new questions. Just my 2 cents. (Oh, and having links down to the answers mentioned might be nice too) –  cdeszaq Mar 22 '12 at 19:05
add comment

There's been some talk in the comments about converting Greg's, and or Shog's answers into comments. Let's not. Greg's answer is in my opinion the most valuable of the bunch. Other answers go through the trouble of pointing out the differing language features between Java and JavaScript, but let's be honest: most people ask this question because the names sound similar. Greg's answer is a good, needed slap to the face for people who think two languages are similar because their names are. His is the most important answer; please don't delete it.

And yes, Shog's answer is a troll from his younger, less mature days. But it made me, and a lot of other people laugh. Let's not bury it in the heap of comments.

There's no need to go back to old questions like this and re-write history in a way we think it should have been written originally. Leave it alone.

share|improve this answer
3  
In hind sight, I support leaving both Greg's and Shog's answers and rescind my earlier proposals to convert them to comments. At this point, the remaining answers are mostly helpful, so I agree, we should lock it, like all historical artifacts, and leave it be. +1 –  cdeszaq Mar 20 '12 at 20:32
    
"There's no need to go back to old questions like this and re-write history in a way we think it should have been written originally". Other than stupid stuff like helping future readers. But that's admittedly a pretty low priority compared to "it makes me laugh" –  Michael Mrozek Mar 20 '12 at 22:24
    
@Michael - I think we're exaggerating a bit, aren't we? If a user really is desperate to see language differences between the two, all he needs to do is roll his index finger a smidge and look at the answer after Shog's. –  Adam Rackis Mar 20 '12 at 22:29
3  
@AdamRackis I caved on the deleting crappy questions argument, because you guys were right that they're a minority and don't come up often, but you've moved from that to "who cares if bad answers are at the top, they're funny". SO is here to help people, not make you smile, and you're happy to keep compromising the former a little bit at a time to encourage the latter –  Michael Mrozek Mar 20 '12 at 22:32
    
@Michael - I think Stack Overflow does an amazing job of keeping serious, and focused. Letting stay the occasional gem, like that one from Shog I don't think changes a thing. –  Adam Rackis Mar 20 '12 at 22:35
4  
@AdamRackis It does if somebody googles the difference between Java and Javascript, finds that question, reads the first couple answers, thinks "wow this site is useless", and leaves. The whole purpose of voting is to put the most useful answers first, since that's what people read first. Not the funniest answers, or "gems of our history" -- the best answers –  Michael Mrozek Mar 20 '12 at 22:37
    
@Mrozek: please. The only reason anyone remembers and links to that question is Greg's answer. You can make the argument that a question that basic doesn't even deserve an answer since it really should be common knowledge... But if you're not, then arguing that folks confused about what their language of choice is called really need is a blow-by-blow feature comparison is just a bit ridiculous. –  Shog9 Mar 20 '12 at 22:38
    
@Shog9 Your argument that the first answer is best has absolutely nothing to do with this. Rackis is arguing that it's perfectly ok for the most helpful answer to be beneath funny answers, and I'm trying to illustrate why it's not –  Michael Mrozek Mar 20 '12 at 22:40
    
@MichaelMrozek: it has everything to do with this. You're still convinced that the utility of the question lies in detailing the differences between two completely different languages. But if you're looking to serve developers moving from one language to the other, you'd be better off focusing on questions like this one. –  Shog9 Mar 20 '12 at 22:47
3  
@Shog9 It doesn't! Forget this particular question; my problem is with comments that say "don't delete bad answers, users can just scroll until they find a good one". That's insanity -- that's utterly absurd. We can keep bad questions and just shove them in a corner with a big "this question blows!" label to cover up our shame, but now we've got people arguing that it's ok for the top answers on a question to be bad, as long as they're funny or old. I don't care about this particular question, but that policy in general is awful –  Michael Mrozek Mar 20 '12 at 22:52
    
@MichaelMrozek: well first off, the only scenario I'm aware of where that's "policy" involves accepted answers. Second, the whole point of this meta thread is to establish - for a specific-question - what value (if any) it has; I'm not sure where you're coming from with this "Forget this particular question" stuff. –  Shog9 Mar 20 '12 at 22:58
    
@Shog9 I got sidetracked by a line in his answer and it led to this, and then you randomly interjected with an argument we were having in chat that had nothing to do with this comment thread. The comment thread was me trying to say that the best answers should be first. I don't care if an answer is old or funny if it's burying a better answer. I'm not arguing about whether or not Greg's answer is good, it's completely irrelevant to this thread –  Michael Mrozek Mar 20 '12 at 23:00
1  
@Michael - I'm just against simple, black and white rules. Life's too subtle for that. I thought Shog's answer added a lot to the question and shouldn't be deleted. The best answer is already first. I don't think deleting Shog's post to get the second best answer second instead of third was all that important. But that's just me –  Adam Rackis Mar 20 '12 at 23:06
1  
@Shog9 We were having a totally separate argument, I don't know why you brought it here. You merged two arguments and now you're confused why they don't line up. Here, in the context of this meta thread, Rackis and I agreed that the third answer on that question was better than the second, and I was arguing that the second should be deleted because it's making it harder to see the third (he disagrees). You and I were arguing, completely separately, about whether or not the first answer was good. Here, in this thread, I'm willing to stipulate that it's good in order to make my point –  Michael Mrozek Mar 20 '12 at 23:11
1  
@Michael: your point being what, exactly? That the first two answers should be deleted? That was Greg's proposal at the start. That the second answer should be deleted? Gilles proposed that. That you can make one line from Adam's post sound terribly by taking it out of context and applying it to things outside of this discussion? Ah, yes, that point hadn't been made yet. Good show! –  Shog9 Mar 20 '12 at 23:19
show 2 more comments

The question should stay. It's a question that many programmers (ok, programmer wannabes, perhaps) have. It may be an extremely basic question, not deserving 100-odd upvotes, but it's a valid question.

The answers, on the other hand… While Greg's flippant answer (“car and carpet”) is, in some sense, the correct answer, it's woefully missing in information. Shog9's answer (“java sucks”) doesn't contribute anything. Chris's answer that shows some language features is a good start. Many of the other answers require curation.

Delete the useless or redundant answers, and leave the question open.

share|improve this answer
2  
+1 for removing useless/redundant answers & curation of others. I agree that the question is a good one if for no other reason than non-programmers or new programmers always get confused in this area. This question being a source of correct information would very much make the Internet a better place, even if it doesn't fit the Q/A format. –  cdeszaq Mar 20 '12 at 20:04
6  
Chris's answer is sincere, but completely misses the point: no one asks this question because they honestly want a blow-by-blow comparison, or if they do I've never seen it: it's born of confusion based on the name, and obscuring that defeats the purpose of answering it at all. Greg's answer communicates this most effectively, IMHO - other good answers are Sachin's and Bill's. –  Shog9 Mar 20 '12 at 20:08
    
Good, funny answers should be turned in to comments, definitely (isn't that the point of comments, to some extent?) –  cdeszaq Mar 20 '12 at 20:08
    
Leaving this question around is like a bizarro episode of Hoarders. –  user7116 Mar 20 '12 at 20:09
1  
@Shog9 - There almost need to be 2 (and only 2) answers for the question. One like yours or Greg's, and then another for programmers who actually want to know the difference between the languages. –  cdeszaq Mar 20 '12 at 20:12
7  
@cdeszaq: sure - it's impossible for me to imagine a version of this question without Chris's answer, simply because it's in the SO user's mindset to always work toward such an answer (and rightly so!) Nevertheless, it's Greg's answer that gets linked to in comments or in chat whenever a new programmer drops in with a confused question about JavaScript tagged [java]. –  Shog9 Mar 20 '12 at 20:15
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .