Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a second implementation of a programming language be written in that language?

This question is just something that I have been thinking about lately. Can a programming language be written in that language as a second implementation? e.g. Java. Is it possible to rewrite the java programming language using the java programming language?

Apologies if this is a silly question but I need to know!

GF

like image 919
Grunge Freak Avatar asked Jul 15 '10 20:07

Grunge Freak


People also ask

Can you create a programming language from another language?

You can just take a subset of an existing language or come up with a simple variation of it and get started. However, if you have plans for creating your very own programming language, you will have to give it some thought. I think of designing a programming language as divided two phases: The big-picture phase.

Which method is used to implement one programming language to another?

Compilers convert one programming language into another. Usually, compilers are used to convert code so the machine can understand it.

Can a programming language be written in itself?

And yes, there are implementations that run/compile the programming language they were written in. Normally there are a series of "bootstraps" to get up to that point, however.

Can you combine 2 programming languages?

It is possible to combine different languages in one project, you just write two different programmes and let them communicate with each other. And in some cases it even makes sense. Say your project is written in Java or Python for the most part but you have a part that requires a little more computing power.


1 Answers

Always. Any Turing-Complete language is -- well -- a Turing-Complete language. If you can write the compiler in one complete language, you can write it in any equivalent language.

like image 135
S.Lott Avatar answered Oct 21 '22 17:10

S.Lott