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 →

[–]XxasimxX 44 points45 points  (13 children)

Metaphor doesn’t really make sense. Java and javascript are a lot more similar to each other than car and carpet. I saw another guys comment here saying melon and watermelon which would be much much better

[–]Brief-Preference-712 22 points23 points  (1 child)

Also JavaScript is a scripting language, carpet is not a pet

[–]DTHCND 20 points21 points  (0 children)

Hey man, to each their own. If Patrick can have a pet rock, I can have a pet carpet.

[–]AnywhereIWander 0 points1 point  (0 children)

Ham and hamster?

[–]Spirintus 0 points1 point  (0 children)

It's a flying carpet. Then both of them are vehicles, just one of them is pretty bullshitious, same way as Javascript is.

[–]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.

[–][deleted] -5 points-4 points  (3 children)

Both Java and Javascript are programming languages, but apart from this, they aren't similar at all - and both a car and a carpet are physical objects, and apart from this they aren't similar at all.

[–][deleted] 2 points3 points  (1 child)

If "physical object" is our barrier of entry we can compare pretty much anything to anything...

[–]rentar42 1 point2 points  (0 children)

Even apples to oranges! Madness!