3 ms·
Interesting article. I've been designing my own language for the past year and a half: https://letlang.dev https://letlang.dev I feel like the phase 2 of the
by linkdd 5y ago
Interesting article.
I've been designing my own language for the past year and a half: https://letlang.dev https://letlang.dev
I feel like the phase 2 of the design is very long, longer every time I have a question like:
- how would I do this?
- does this syntax make sense with the rest of the language?
- is this feature really useful? how would it be used?
As for the compiler, I've often started to write the parser for an ever-changing syntax, while the AST did not change that much.
Now, I use a different approach: I write the AST and then the compiling/transpiling/interpreting phase. This allows me to make unit tests and make sure things work the way I intend it to. The parser will be the last piece of the puzzle.
After 1 year and a half, I just began writing the compiler, and I expect to switch between implementation and design quite often as I encounter road blocks. I'm also expecting to cut some features to get a first MVP out, but the AST will be there.