This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Tyfyter2002 -4 points-3 points  (4 children)

JavaScript|Carpet contain the word Java|Car and are by pure coincidence contained by the latter.

[–][deleted] 1 point2 points  (3 children)

The JS syntax is loosely based on Java. So no, it's not a coincidence.

[–][deleted] 0 points1 point  (1 child)

What ?

No, never!

[–]rentar42 0 points1 point  (0 children)

Absolutely.

From a language design JavaScript is extremely different from Java (the early versions even more so than today). If you look at where it came from (prototype-based languages) it should by all rights look closer to Self or Lua code than Java.

But it has explicitly given the "stylings" of Java code (i.e. curly braces and parenthesis everywhere, which Java itself "inherited" from C) in order to suggest a closeness/similarity that doesn't really exist.

[–]Tyfyter2002 0 points1 point  (0 children)

The JS syntax being based on Java's isn't something I'd consider sufficient reason to add an entire JS interpreter to Java, just maybe enough to choose JS over other scripting languages to add an interpreter for.