Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Creating a hybrid programming language using Java and Javascript, is it possible?

0
mayur naik Posted

Creating a hybrid programming language using Java and Javascript, is it possible?

0

It depends on what you mean by “hybrid” language.
A language have a lot of rules on how is it compiled, interpreted and used.

0
Austin Tasato

I don’t think it’s very likely.

JavaScript is a dynamic scripting language. it is relatively implementation agnostic; in fact, Node.js is one example of how JavaScript can be embedded into some sort of environment. Node.js is literally a Javascript interpreter given some neat trick and functionality to use in its system.

Java, however, is a very different language. Everything in Java is an object, while in JavaScript, things might be a bit different. It’s to JavaScript as car is to carpet. If anything, the best idea is to simply embed JavaScript into Java using something like Rhino.

A hybrid language, if literally done, would require blending aspects of both into one. This would involve a new compiler, interpreter scheme, etc.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123