News for hackers. Stuff that matters.
Re:Java is not JavaScript - tell your friends by mistercow on Thursday January 17, 2013 @09:20PM (#5076685)
Sometimes I feel like the idiotic marketing decision to name it "JavaScript" is never going to stop haunting us. The only ways out are for 1) Java to die (not going to happen), 2) JS to die (not going to happen), or 3) everybody to start calling it ECMAScript (probably not going to happen).
Re:Java is not JavaScript - tell your friends by rdtsc on Thursday January 17, 2013 @11:20PM (#5077078)
It's easy. Call it ... CoffeeScript.

/ducks

Re:Java is not JavaScript - tell your friends by mikeash on Thursday January 17, 2013 @09:49PM (#5076763)
"ECMAScript" sounds like some sort of horrible disease.
Re:Java is not JavaScript - tell your friends by oftenwrong on Thursday January 17, 2013 @10:31PM (#5076923)
I agree; it is fitting.
Re:Java is not JavaScript - tell your friends by mistercow on Thursday January 17, 2013 @10:39PM (#5076954)
Man, you should probably never say anything is fitting with a username like that. It's just too wide an opening.
Re:Java is not JavaScript - tell your friends by TillE on Thursday January 17, 2013 @09:44PM (#5076744)
Never is a long time. Java is in a strange, precarious situation already, and JavaScript won't last forever as the only option for client-side scripting. It'll slowly fade from relevance once there's a better option.
Re:Java is not JavaScript - tell your friends by chii on Thursday January 17, 2013 @10:55PM (#5076998)
Java is in no way in a precarious situation! its one of the most popular enterprise language. Just because the cool kids these days think java is lame because they've got their ruby and node.js, doesn't mean java is dying at all. And i m saying this even tho i dislike oracle.
Re:Java is not JavaScript - tell your friends by runn1ng on Friday January 18, 2013 @12:20AM (#5077267)
Yes, but java applets ARE in precarious situation and they rarely work at all.

The only time I have seen a java applet recently was on a website with ATARI emulator (I guess it still wasn't ported to JavaScript and/or Flash).

Re:Java is not JavaScript - tell your friends by chii on Friday January 18, 2013 @01:10AM (#5077400)
you are correct. I also have mentally struck applets from memory, and so to me they no longer exist ;)

...except that there are stock trading software that is written as java applets...sigh...

Re:Java is not JavaScript - tell your friends by outside1234 on Friday January 18, 2013 @12:25AM (#5077281)
Javascript will fade from relevance right after plastic decomposes.
Re:Java is not JavaScript - tell your friends by zachrose on Friday January 18, 2013 @12:38AM (#5077314)
And cockroaches go extinct.
Re:Java is not JavaScript - tell your friends by sbmassey on Thursday January 17, 2013 @10:39PM (#5076953)
Plus humanity will eventually perish
Re:Java is not JavaScript - tell your friends by arcatek on Thursday January 17, 2013 @10:15PM (#5076870)
I can be wrong, but I think remembering that Javascript is superset of ECMAScript (ActionScript being also based on ECMAScript, for example).
Re:Java is not JavaScript - tell your friends by bluedanieru on Thursday January 17, 2013 @09:24PM (#5076695)
Just start calling it Mocha. That was to be the name originally, iirc, and it's heaps better.

I know one person who calls it ECMAScript. You probably know an awful lot about this person just by my telling you that one thing.

Re:Java is not JavaScript - tell your friends by mediumdeviation on Thursday January 17, 2013 @11:14PM (#5077065)
Except ECMAScript isn't correct either. ECMAScript is the name of the standard. Each browser implements a (different) subset of it. JavaScript used to be what Mozilla's implementation was called; Microsoft implemented JScript. ActionScript, the scripting language used in Adoble Flash, is also an implementation of ECMAScript.

Modern browsers implement ECMAScript 5; older browsers and AS 2.0 implement ECMAScript 3. ECMAScript 4 was scrapped, but AS 3.0 still implements it. Wikipedia, as usual, has all the gory details if anyone is actually interested http://en.wikipedia.org/wiki/ECMAScript

Re:Java is not JavaScript - tell your friends by ldh on Friday January 18, 2013 @12:18AM (#5077260)
I actually read your comment as a strong case for ECMAScript being the most correct. Certainly more than the name of one particular implementation of the language standard.

Browsers all implement HTML differently, but we're happy to refer to it by the name of the standard.

Re:Java is not JavaScript - tell your friends by zalew on Thursday January 17, 2013 @11:43PM (#5077153)
> ECMAScript is the name of the standard. Each browser implements a (different) subset of it. JavaScript used to be what Mozilla's implementation was called; Microsoft implemented JScript.

mocha and livescript were the names at netscape. naming it javascript was a marketing strategy and a product of the sun-netscape cooperation. the ecmascript standard was born later, after the adoption of javascript/jscript.

Re:Java is not JavaScript - tell your friends by mistercow on Friday January 18, 2013 @01:00AM (#5077372)
>ECMAScript is the name of the standard. Each browser implements a (different) subset of it

Supersets, not subsets. In terms of syntax, there is essentially no difference between ECMAScript, JavaScript, and JScript. They're just different implementations of the same thing. In fact, the only reason JScript has a different name is because Microsoft didn't want to license the Java trademark from Sun.

ActionScript is a different animal; it's a superset of ECMAScript and has a lot of additional syntax features, like data type support.

In any case, to work across different browsers, JS code is usually written in the intersection of the ECMAScript superset languages implemented by those browsers. That intersection is ECMAScript.

Re:Java is not JavaScript - tell your friends by RossM on Friday January 18, 2013 @02:41AM (#5077603)
Ah, is Mocha where the naming for CoffeeScript came from then? I like it too.
Re:Java is not JavaScript - tell your friends by bluedanieru on Sunday January 20, 2013 @07:18AM (#5086701)
I assume the name for CoffeeScript came from it being calling JavaScript.
Re:Java is not JavaScript - tell your friends by mylittlepony on Thursday January 17, 2013 @10:02PM (#5076822)
It was originally called LiveScript if I remember correctly, which was a beautiful and descriptive name. But then they renamed it to JavaScript for some reason.
Re:Java is not JavaScript - tell your friends by flomo on Friday January 18, 2013 @01:55AM (#5077497)
Agreed, LiveScript was a very good name.

I'm curious who owns the LiveScript trademark, if anyone. If the Mozilla Foundation inherited it from Netscape/AOL, they should give it to ECMA. At this point, the association with Java is probably more of a negative.

(The most popular web browser can't even use the JavaScript trademark, due to totally unrelated events from 15 years ago. IMO a rebranding would still be feasible.)

Re:Java is not JavaScript - tell your friends by jaredsohn on Friday January 18, 2013 @02:11AM (#5077530)
I don't know if they have a trademark for it or not, but a quick Google shows that a CoffeeScript-like language with that name exists.
Re:Java is not JavaScript - tell your friends by MatthewPhillips on Thursday January 17, 2013 @09:42PM (#5076739)
Tell recruiters, I keep getting calls for Struts jobs and I have to tell them I know nothing about that.
Re:Java is not JavaScript - tell your friends by gokulk on Friday January 18, 2013 @12:39AM (#5077320)
Oh God the recruiters. What types of Java Scripts do you know.
Re:Java is not JavaScript - tell your friends by brudgers on Thursday January 17, 2013 @09:31PM (#5076719)
Disabling Java slightly reduces my security risk when browsing the web.

Disabling Javascript slightly reduces my security risk when browsing the web and greatly reduces my privacy risk. It's just that tracking people across the web is common to the point it is ignored...and it is amazing how many websites are better without it.

Re:Java is not JavaScript - tell your friends by bstar77 on Thursday January 17, 2013 @10:34PM (#5076933)
Disabling javascript completely eliminates the ability to use the web effectively, unless you're Richard Stallman. 10 years ago we could justify disabling javascript, not today.
Re:Java is not JavaScript - tell your friends by SoftwareMaven on Friday January 18, 2013 @12:00AM (#5077211)
I default to JS off everywhere, then decide on a case-by-case basis if a site should be white-listed permanently, allowed to run javascript temporarily, or not allowed. Doing this allows me to prohibit all the various tracking snippets (as many as 10 at large media sites) while still allowing me to use the web quite effectively (in a non-RMS way).
Re:Java is not JavaScript - tell your friends by bstar77 on Friday January 18, 2013 @12:59AM (#5077371)
Why not just browse in incognito/private mode?
Re:Java is not JavaScript - tell your friends by SoftwareMaven on Friday January 18, 2013 @02:00AM (#5077503)
Actually, based on this thread, I'm going to give ghostery a try. I like the speed increase of no JS when the site works without it, but there is a non-insignificant number if sites that require a reload after loading the content and finding it won't degrade gracefully.
Re:Java is not JavaScript - tell your friends by graue on Thursday January 17, 2013 @10:10PM (#5076850)
Are you unaware of Ghostery, or do you not trust it (why not)?

https://www.ghostery.com/

I use that, AdBlock, and YesScript for the occasional particularly annoying site (it's a blacklist, not a whitelist like NoScript). I also clear all cookies on browser quit. Haven't lost sleep over browsing privacy in a long time.

Re:Java is not JavaScript - tell your friends by acchow on Thursday January 17, 2013 @09:51PM (#5076775)
Most websites aren't very good without JS...
Re:Java is not JavaScript - tell your friends by artmageddon on Thursday January 17, 2013 @10:07PM (#5076838)
I use NoScript in Firefox. You can white-list the sites that want you to use JavaScript, and deny the ones that don't. I'll white-list HN, Reddit, Gmail, etc. but if I go to a site that isn't Facebook which suddenly requires me to enable Facebook's Javascript code, for who knows what reason, I'm not allowing that code to run in that session.

To more directly answer your question, yes, many sites will not be very good with JS turned off, but I can decide whether that site is using or not.

Re:Java is not JavaScript - tell your friends by exodust on Thursday January 17, 2013 @11:34PM (#5077127)
NoScript is NoGood because it's a whitelist. The vast majority of JS on the web is useful and harmless. As more websites employ AJAX and web-app functionality by default, maintaining a whitelist is pretty much ridiculous. What you want, if anything, is a blacklist.

"Private browsing mode" is also more sensible than NoScript for browsing the unfamiliar Wild Web.

A whitelist is the equivalent of wearing a helmet when driving. Sure, in the event you roll your car, the helmet will come in handy.

Re:Java is not JavaScript - tell your friends by untog on Thursday January 17, 2013 @10:18PM (#5076888)
I prefer a solution like https://disconnect.me/ - disables Facebook/Google/etc JS scripts but lets the site use JS otherwise.
Re:Java is not JavaScript - tell your friends by exodust on Thursday January 17, 2013 @11:44PM (#5077160)
Nice one. I didn't know about this. Looking now at the video they link to: http://youtu.be/BK_E3Bjpe0E
Re:Java is not JavaScript - tell your friends by plorkyeran on Thursday January 17, 2013 @11:40PM (#5077146)
A shocking number of web sites are better with JS disabled.
Re:Java is not JavaScript - tell your friends by acchow on Friday January 18, 2013 @11:31AM (#5079455)
Examples, please and thank you.
Re:Java is not JavaScript - tell your friends by yuhong on Thursday January 17, 2013 @10:35PM (#5076941)
The difference is Java is a third party add-on, while JavaScript is part of the browser.
Re:Java is not JavaScript - tell your friends by dropdownmenu on Friday January 18, 2013 @12:08AM (#5077233)
I have to explain this difference to my dad about once a week.

Can't we just start calling javascript awesomescript?

Re:Java is not JavaScript - tell your friends by jtanderson on Thursday January 17, 2013 @09:04PM (#5076635)
Unfortunately, many of my non-developer/computer science friends make this confusion disturbingly often. All things considered, it's pretty understandable mistake. Look at Clojure/Clojurescript; though not a great analogy, it shows that such a name similarity definitely implies a relationship other than "it has similar syntax."
Re:Java is not JavaScript - tell your friends by Tloewald on Thursday January 17, 2013 @09:18PM (#5076681)
It's actually surprising how many technical people think that they're either the same, or javascript is closely related, perhapx a "lite" version. Then there are the JS frameworks that try to make coding in JavaScript more like coding im Java...
Re:Java is not JavaScript - tell your friends by yuhong on Thursday January 17, 2013 @10:52PM (#5076985)
This reminds me that they did deliberately try to make JavaScript look like Java, but again it is for mostly marketing purposes.
Re:Java is not JavaScript - tell your friends by dougk16 on Thursday January 17, 2013 @10:05PM (#5076830)
Let's just hope Go! doesn't suddenly become popular...
Re:Java is not JavaScript - tell your friends by archgoon on Thursday January 17, 2013 @10:51PM (#5076983)
Only an issue if Go becomes popular as well.

EDIT: Must have missed the headlines where Go was the new java.

Re:Java is not JavaScript - tell your friends by chimeracoder on Thursday January 17, 2013 @10:58PM (#5077007)
What, you mean "issue 9" isn't a catchy enough name?
Re:Java is not JavaScript - tell your friends by arundavid on Friday January 18, 2013 @02:24AM (#5077562)
I my view, most non-technical people thinks 'Javascript is Java'.. not 'Java is Javascript' as given in the title.