5

I once met a guy who seriously thought that JavaScript was an interpreted language, merely because it has an eval() function...

Comments
  • 3
    A great number of implementations are interpreted. Only Javascript (MS Edge), V8 (Chrome, NodeJS) and Spidermonkey (firefox) are JITed.

    Some are VMed like Duktape, and most are interpreted, but less used
  • 3
    And it is ECMAScript you are talking of, Javascript is specific to Netscape and Internet Explorer

    PS: Sorry for the cynicism and potential aggressivity, I have nothing against you
  • 0
    @QCat I thought ECMAScript was just the specification. I'm not a JS/WebDev anyway, so I don't know much about it, but I just find his reasoning so incredibly stupid...
  • 0
    @Krokoklemme ECMAScript is the specification, Javascript is the implementation embedded in Internet Explorer.

    Back in the days when JIT was not hype, it was interpreted, and most of reflective language (ie languages with eval like statement) are potentially interpreted. Example : if a C# code (more exactly its CIL representation) is simple enough, the runtime does not compile it but rather interpret it in a stack. The JVM does the same
  • 0
    @QCat I know how that stuff works (implementing a VM myself atm) and I did knew that some JS were jitted too, but that wasn't my point at all ._.
  • 1
    @Krokoklemme I just mean... He was not that stupid thinking this from seeing eval (aka reflection) and saying "Ow that is interpreted", take it easy, I am not looking bad at you, and implementing a VM atm too xD
  • 2
    Actually, I think it should be considered an interpreted language for the common use cases. The closest thing to compilation is what the interpreter does, which is pretty close, but technically still not the same thing as it is free to implement by the vendor. There is no binary, no standard vm or bytecode, no transformations of the source to anything else before execution. Everything of the sort that happens in respective interpreter is purely because optimization and performance. And it would not even break anything if an implementation allowed live editing of the code as it was executed.
  • 0
    Well.. JavaScript is an interpreted language. And most every language with an eval function is interpreted. Not necessarily always true, but still. Wikipedia.

    Look here: https://en.m.wikipedia.org/wiki/...
    Under Implementation and Programming languages.. it is really unnecessarily difficult to get a compiled language an eval function.
  • 0
    @rrmhearts I know, but imo it's still stupid to use that as an argument (especially as the only one)
Add Comment