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
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.
Compilers convert one programming language into another. Usually, compilers are used to convert code so the machine can understand it.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With