Is Java fully object-oriented?

Could you build a fully functional programming language like Java, in a scripting language like JavaScript?

  • Specifically, I am asking could you program an interpreter and a VM for a programming language, in a scripting language code like JavaScript?

  • Answer:

    You could, with server-side Javasctipt. Just bits in web pages would be a little limited in terms of I/O. It' would be a bit nutty, though. On the other hand, I once saw a version of LISP implemented in AWK.

Eric Pepke at Quora Visit the source

Was this solution helpful to you?

Other answers

This is a Python Interpreter -> http://www.skulpt.org Built using Javascript. So yeah! its possible! But building a language via Javascript and taking it to production level performance and speed is not easy.

Prithvi Raj

Given that Javascript is turing-complete, yes absolutely. Now of course, if you want it to be efficient, that's another story.

Rudi Chen

http://pypy.org PyPy is exactly this. It is Python implemented in Python and it outperforms CPython which is implemented in C. PyPy has also been used as a basis to implement other languages in Python. http://docs.topazruby.com/en/latest/ Topaz is Ruby implemented in Python (using PyPy code) also with the aim of outperforming. http://coffeescript.org CoffeScript is implemented in JavaScript but I wouldn't count it as a full implementation because no VM or machine code output. It just uses JavaScript itself as its output. If I started implementing a performance-oriented language today, my platform of choice would be LLVM (C++) but if performance weren't critical PyPy would be a great place to start. Regardless I would do the front-end (Lex, Parse, Lower) in some high-level language because it is just a ton of work.

Michael Fox

Yes and has already been done recently. That is a JVM that runs in JavaScript and doesn't need a plugin. I forget the name of the project.. Answer was collapsed, adding another redundant sentence.

Páll Haraldsson

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.