There are several reasons for creating a new language:
You see deficiencies and what to create a language that is easier to use, or more robust
The domain you're working in could benefit from having it's own language (domain specific languages)
You want to challenge yourself or test a theory in language design
You want to extend/create vendor lock-in to a platform
To create a new language you need to produce a compiler -- or interpreter, but the differences at the high-level aren't important. These consist of a few general parts:
Parser: Processes text files and converts them to a language usable by the next step. This is the abstract syntax tree (AST).
Apply Semantics: Go through the AST and figure out the proper type, as well as change the structure for various language features. I called this the "Typing" stage in my compiler, though I guess some languages emphasis more the structure here.
Reduce: Convert the expanded AST into an intermediate langauge (IL). This may be done in one or two steps, depending on the language. I had two steps in my compiler, one for a custom IR, and then to LLVM-IR to make use of standard tools.
Emit: Convert the IR into a target specific machine code -- which may be an actual machine code, or the byte code of a VM.
Compilers are written in other languages. A few end up as self-hosting, which means the compiler is eventually rewritten in the language it compiles. Though the vast majority of compilers are not self-hosted, and there's rarely a good reason to do self-hosting.
At my 30s I found out that there was a developer inside a Political Science Graduated.
I've been COO an CMO for 4 years but I decided to persue my dream and become a Front-end developer:)
Location
Elche, Alicante, Spain
Education
Certificate of Higher Education for Web Applications Development & Degree in Political Science
There are several reasons for creating a new language:
To create a new language you need to produce a compiler -- or interpreter, but the differences at the high-level aren't important. These consist of a few general parts:
Compilers are written in other languages. A few end up as self-hosting, which means the compiler is eventually rewritten in the language it compiles. Though the vast majority of compilers are not self-hosted, and there's rarely a good reason to do self-hosting.
Thank you very much for enlighting me and sharing this :)