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
Other answers
https://github.com/YaroslavGaponov/node-jvm And same question on StackOverflow: http://stackoverflow.com/questions/12316557/javascript-jvm-implementation
Ryan Gao
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
Related Q & A:
- What is a "modern" programming language?Best solution by Quora
- What is a group interview like a Build-A-Bear Workshop?Best solution by Yahoo! Answers
- What outdoor clothing company has a logo that looks almost like a Fish (a Jesus-Fish) with a word inside it?Best solution by Yahoo! Answers
- Is java or visual basic a machine level, low level, high level or binary level programming language?Best solution by Quora
- Is C a good language to start out learning programming?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.