this post was submitted on 26 Feb 2024
-16 points (21.4% liked)

Programming

17270 readers
39 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

I linked to the anchor where it says that, right to the bottom of the section 4.3. Will people just STOP saying JavaScript was 'never intended' to have 'nothing to do with Java'? They clearly meant JavaScript to be to Java what AWK is to C, at least syntax-wise. I was born one year after JS was conceived (the standard says 'invented', invented my ass! Who 'invents' a language?) so I am too young to have been around in the early days of web. But it seems like people back then wanted Java to be lingua franca of web, a bit like PostScript in the thread I posted a few hours ago. They named it JavaScript to assure people that it's the interpreted, scripting form of Java.

Now don't say 'JS and Java are like car and carpet' you will look like an idiot.

Also if you are wondering why I am reading the standard, it serves two purposes. First is, I wanna implement it one day in the future. Second is, I know shit about web scripting and I wanted to make myself a blog and I miserably failed. So I am learning it.

I know nobody asked, but one person might be wondering why someone would do this to himself.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 7 points 8 months ago (3 children)

JavaScript was created by Brendan Eich for the Netscape Browser. The job said to embed Java in the browser, but Eich was a Lisp guy and wished he could actually embed Scheme instead. Scheme is about as far as Java as one can get in terms of paradigm. Eich must have been stubborn because the result was JavaScript which is almost, but not quite, entirely unlike Java. Lulled by the seemingly familiar syntax, decades of coders have been baffled by the wild prototype-based object paradigm and the functional style hiding underneath.

JavaScript being somewhat like Java was an arbitrary constraint that was pushed by marketing and that was very partially honoured during implementation. The kinship between the two languages is slim at best. When explaining tech issues to the layperson, it’s important not to sweat the details and get to the point. Here the point is: JavaScript and Java are like car and carpet.

Also, chill. You have a lot to learn. We all do. Stop saying your colleagues look like idiots.

[–] [email protected] 0 points 8 months ago (2 children)

Good info dump. Can't image S-Expressions in web dev today really. Also, I did not mean it maliciously, this is a stupid thing after all.

[–] [email protected] 1 points 8 months ago

No biggie! The birth of JS is told in numerous different places (and ways) on the net, if you’re curious you should definitely look it up.

[–] [email protected] 1 points 8 months ago

To be honest, XML can be considered to just be a more verbose version of s-expressions. It is easy to convert between XML and SXML.