News for hackers. Stuff that matters.
Re:Netscape and Sun announce JavaScript (1995) by bazoom42 on Wednesday July 19, 2023 @08:45AM (#36785424)
> 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.

Re:Netscape and Sun announce JavaScript (1995) by neilv on Wednesday July 19, 2023 @09:41AM (#36786170)
It'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.

Re:Netscape and Sun announce JavaScript (1995) by ryandrake on Wednesday July 19, 2023 @11:28AM (#36788016)
> 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.

Re:Netscape and Sun announce JavaScript (1995) by bazoom42 on Wednesday July 19, 2023 @01:18PM (#36789906)
Whole-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.
Re:Netscape and Sun announce JavaScript (1995) by throw0101b on Wednesday July 19, 2023 @09:14AM (#36785753)
> 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?

Re:Netscape and Sun announce JavaScript (1995) by bazoom42 on Wednesday July 19, 2023 @09:39AM (#36786139)
If 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.
Re:Netscape and Sun announce JavaScript (1995) by panick21_ on Wednesday July 19, 2023 @11:26AM (#36787998)
Perl was pretty complex and not easy to embed. Self would have made sense, as Sun already had a very good implementation.
Re:Netscape and Sun announce JavaScript (1995) by jpalomaki on Wednesday July 19, 2023 @09:50AM (#36786314)
Some 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/ [2] https://2ality.com/2011/03/javascript-how-it-all-began.html

Re:Netscape and Sun announce JavaScript (1995) by andsoitis on Wednesday July 19, 2023 @10:04AM (#36786530)
> 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?

Re:Netscape and Sun announce JavaScript (1995) by foobarian on Wednesday July 19, 2023 @11:48AM (#36788351)
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."

Re:Netscape and Sun announce JavaScript (1995) by andsoitis on Wednesday July 19, 2023 @02:00PM (#36790567)
Thanks 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!

Re:Netscape and Sun announce JavaScript (1995) by foobarian on Wednesday July 19, 2023 @02:13PM (#36790770)
> 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 :-)

Re:Netscape and Sun announce JavaScript (1995) by olddustytrail on Wednesday July 19, 2023 @03:00PM (#36791511)
You 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.

Re:Netscape and Sun announce JavaScript (1995) by peterashford on Wednesday July 19, 2023 @11:59PM (#36796745)
it's not an obscure logical fallacy, it's very common indeed
Re:Netscape and Sun announce JavaScript (1995) by blacksqr on Wednesday July 19, 2023 @11:41AM (#36788235)
Don't worry, Tcl is also being proposed as the internet scripting language standard. I'm sure wiser heads will prevail.
Re:Netscape and Sun announce JavaScript (1995) by smashed on Wednesday July 19, 2023 @11:55AM (#36788472)
Or 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.

Re:Netscape and Sun announce JavaScript (1995) by bazoom42 on Wednesday July 19, 2023 @12:23PM (#36788951)
There 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, both use ‘==‘ to compare values, use the same Date library which is throughly tested and future proof etc.
Re:Netscape and Sun announce JavaScript (1995) by yoz on Wednesday July 19, 2023 @11:34PM (#36796610)
Wow, 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?