4 ms·
> I also wonder what's the difference between Java and JavaScript, at first glance, they look very similar. JavaScript is a scripting language and therefore mu
by bazoom42 3y ago
> I also wonder what's the difference between Java and JavaScript, at first glance, they look very similar.
JavaScript is a scripting language and therefore much easier to use. No slow compilation and build step, no complex and rigid type system yelling at you, no dependency hell. Just type the code in notepad and press f5 in the browser to see it run. You dont need to understand advanced concepts like classes or packages or exceptions. It is as simple to write as an Excel macro.
Java on the other hand requires professional programmers, which are a lot more expensive than web designers, and less fun.
- throw0101b 3y ago> JavaScript is a scripting language and therefore much easier to use. There are already scripting languages available. Why not just use something like Tcl which is lightweight and easily embeddable? Why re-invent the wheel?
- bazoom42 3y agoIf they had to chose an existing scripting language, surely Perl would be the obvious choice? Perl is designed after how humans think, where other languages force you to think like a computer.
- panick21_ 3y agoPerl was pretty complex and not easy to embed. Self would have made sense, as Sun already had a very good implementation.
- jpalomaki 3y agoSome history can be found at least here [1] and [2]. Based on that, the original idea was to build something that was based on Scheme. Then Sun came to the picture. They already had Java and there was pressure to have something that looked like Java. Story was that you would Java for the big stuff and Javascript for more light-weight client-side tasks. That (marketing) worked out pretty well. At least for me it took years to figure out what kind of language Javascript really was. Seeing jQuery for the first time was kind of revelation. [1] https://auth0.com/blog/a-brief-history-of-javascript/ https://auth0.com/blog/a-brief-history-of-javascript/ [2] https://2ality.com/2011/03/javascript-how-it-all-began.html https://2ality.com/2011/03/javascript-how-it-all-began.html
- andsoitis 3y ago> There are already scripting languages available. Why not just use something like Tcl which is lightweight and easily embeddable? Why re-invent the wheel? This just begs the question: why are there already multiple scripting languages available. And this further begs the question: why are people still "re-inventing" the wheel by building new languages?
- foobarian 3y agohttps://stancarey.wordpress.com/2015/12/09/raising-the-question-of-beg-the-question/ https://stancarey.wordpress.com/2015/12/09/raising-the-quest... "There was once a dream that was Rome. You could only whisper it. Anything more than a whisper and it would vanish, it was so fragile. And I fear that it will not survive the winter."
- andsoitis 3y agoThanks for the illuminating explanation. Sounds like I can blame whoever translated to English in a 1581 text of Aristotle’s Prior Analytics, the wrong usage of “beg”. At the same time, I intend to use the phrase correctly in the future!
- foobarian 3y ago> At the same time, I intend to use the phrase correctly in the future! These kinds of dual usages come up pretty often, but in that spectrum I find this one very interesting because it is somehow very good at scratching some sort of intellectual/elitist itch in all of us. Both usages are fine, but one is more rare (but not too rare) and "came first" so is ostensibly more "correct." Which makes it very satisfying to bring up in these kinds of conversations :-)
- olddustytrail 3y agoYou did use it correctly. Anyone arguing that you can't use words to mean what they obviously mean and that everyone takes them to mean, but instead must only use them to refer to obscure logical fallacies is clearly nuts and should be ignored.
- blacksqr 3y agoDon't worry, Tcl is also being proposed as the internet scripting language standard. I'm sure wiser heads will prevail.
- smashed 3y agoOr what millions of windows developers already know and love: visual basic. I hope Microsoft comes up with something like it, so we are not forced to learn java in order to add scripts to html pages.
- bazoom42 3y agoThere is great synergy in having the two complementary language using (almost) the same syntax. E.g. Both use ‘this’ to refer to the current object, ‘new’ to create a new object, ‘==‘ to compare values, both use the same Date library which is throughly tested and future proof, both have wrappers to turn primitives into objects etc. Surely this will avoid a lot of mistakes when switcing between the two languages.
- yoz 3y agoWow, that’s exciting! Maybe I’m being too optimistic, but does this mean we’ll soon be able to write single pieces of code that can execute on both client- and server-side? It sounds like pure Java will get us part of the way there thanks to applets – which are also supported in Netscape 2.0 – but JavaScript gives much more control of the whole page. I played with it in an early beta when it was called LiveScript and wrote a crossword puzzle that didn’t need to reload the page at all. Amazing! Now if I can write the backend part in Java and have it work the same way… I can’t wait for the Java and JavaScript syntaxes to unite and make web page development simpler. Netscape and Sun HQs are just a handful of miles apart, so come on folks, don’t drag it out! Could we get this before the end of the year?
- neilv 3y agoIt's 1995. What's a "Web designer"? You mean those graphic design people who try to make the whole page as a GIF, like they're making a print brochure, and just don't get hypertext? Don't worry, they'll clue in or get left behind. The power of a global distributed hypertext for free sharing of information is so superior that it can't be subverted. The Internet sees these advertising-type designers as damage, and routes around them.
- ryandrake 3y ago> You mean those graphic design people who try to make the whole page as a GIF, like they're making a print brochure, and just don't get hypertext? > Don't worry, they'll clue in or get left behind. Time traveler here. People with this same mentality are still working in 2023, but instead of making the whole page an image, they're making the whole page a "web app". Almost three decades later, they still don't get hypertext.
- bazoom42 3y agoWhole-page gifs were only necessary because of the lack of layout support in HTML. But with the recent introduction of the powerful TABLE-tag, HTML now has a future-proof layout model which will surely be enhanced further with more tags, giving a fine-grained control over typography and layout.