Has anybody ever thought how programming languages are made? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Has anybody ever thought how programming languages are made?

17th Feb 2018, 11:05 AM
Aryaman Gupta
7 Answers
+ 1
For making your own language: First step is to decide why you are doing this. If there is no problem to solve, the best result you will get is a copy of your favourite language but with different syntax. Second is to design the language’s capabilities and syntax. Now, you know how it will be structured. Now, will it be compiled or interpreted? (I already explained the difference in the other post) COMPILED What language will it be compiled to? Optional: Create a library in that language that the compiled code will use. This should implement most features of the new language itself. It will make future steps easier. Create a program in any language that will take the code as input then output the equivalent in the language it will be compiled to. Use the library you created in the compiled code if you followed that step. You now have a language. INTERPRETED What language will be used to make the interpreter? It should be a fast language, no slower than Java or else your code will run about as quickly as Python. Optional: Create a library to be used by the interpreter to make the code more readable. Create a program that will do read your new language and execute it correctly. This is explained in more detail in my other post. You now have a language. BOTH First, restart this process and design another language with very basic syntax, maybe even little to no operators. This should be interpreted. Now, for your first language, follow the steps for a compiled language, but compile into the interpreted language you just created. You now have 2 languages. Why do both? A purely interpreted language will probably run like Python. This works in a similar way to Java bytecode. It is still interpreted, but it is ridiculously easy for the interpreter to read, making it run much faster.
20th Feb 2018, 1:35 AM
Jacob Pembleton
Jacob Pembleton - avatar
+ 2
I mean how are c++,java, python made
17th Feb 2018, 11:20 AM
Aryaman Gupta
+ 1
jacob you just described an interpreter and a compiler...
17th Feb 2018, 2:30 PM
Obbu
Obbu - avatar
+ 1
Yes Jacob you're right but how is it made. Programming or what
17th Feb 2018, 3:00 PM
Aryaman Gupta
+ 1
yup you're right
20th Feb 2018, 4:07 AM
Aryaman Gupta
0
loads of companies make them even facebook has made one
17th Feb 2018, 11:14 AM
Obbu
Obbu - avatar
0
They all either get compiled into a lower level language (eventually machine language) or are interpreted by another program, which means to read one line, decide what it’s trying to do, do that, then start again on the next line.
17th Feb 2018, 12:44 PM
Jacob Pembleton
Jacob Pembleton - avatar