4 ms·
Javascript was marketed towards Java programmers, and those languages are pretty different from each other too.
by iainmerrick 7y ago
Javascript was marketed towards Java programmers, and those languages are pretty different from each other too.
- tombert 7y agoI would say that C++ is closer to Java than JavaScript is; it's fairly easy to copy-paste and edit C++ code into a Java file with, just changing a small amount of syntax and get rid of the manual memory allocations. Try copy-pasting JS into a Java file, and there are semantics there that are completely foreign; you can't simply translate it.
- iainmerrick 7y agoI agree that JS and Java are very different; that was my point. I disagree about Java and C++. If I have a C++ file that uses RAII or references, for example, it won’t translate to Java easily. And those aren’t unusual, they’re both common techniques.