Comment on Servo: A new, independent Web Browser Engine (the core of a web browser) written in Rust.

<- View Parent
ayyy@sh.itjust.works ⁨1⁩ ⁨day⁩ ago

This is an entire branch of computer science that people dedicate their lives to, called language design. You’re correct that we use software to translate a programming language into assembly language. That software is called a compiler.

As far as developing new languages, typically one starts by defining a “formal grammar”, typically in the .lex format. Since writing a whole compiler can be complicated and time consuming, most people just build off of the work of others and adapt an existing compiler such as “LLVM” to understand the grammar of their new language.

It sounds crazy to the uninitiated, but the best way to start learning about how to make computer languages is to learn about what a Turing tape machine is, and what it’s capable of. Then you will be able to understand what the difference between a “context-free” grammar and a “stateful” grammar.

source
Sort:hotnewtop