4 ms·
yes. I'm trying to build a relational lang (in python, F#, Swift and now rust) and have stayed at the AST level all this time. I only put the lexer to be done
by mamcx 7y ago
yes.
I'm trying to build a relational lang (in python, F#, Swift and now rust) and have stayed at the AST level all this time.
I only put the lexer to be done from someone that wanna learn rust.
----
Is incredible how hard is tu build more complex semantics than "1 + 1". I have even get some nice answers from the guy of crafting-interpreters and he not even now some of them!
Things you wanna know, and maybe you not find (easily) how:
* How incorporate AGDT and pattern matching in a lang. It take me A LOT of time to figure that you can encode it in arrays + labels (now you get more samples of do it... Is getting more popular with hobbits to implement it)
* How implement type inference
* How create generators, coroutines and the like, specially if your host not have it
* ok, add a debugger
* ok, add support for a IDE or at least a code editor
* How design a FFI system?
* How make a lang without GC and it work fine?
* ... and with a GC, not using the one in your host?
* Continuation passing style that perform well in a lang without call-cc
* How to test the lang, correctly! (have not even the idea yet)
* You read tons of paper with amazing ideas, that even claim to have worked. Then you find you can't read most of the "math stuff" inside and no code to look at them. Them PL guys get mad because we ignore them
And many many many more.
- WalterBright 7y ago> You read tons of paper with amazing ideas, that even claim to have worked. They often do work, on a toy compiler that has a carefully selected subset of features expected in a professional compiler. Things like "let's not allow casting! or exceptions! or inline assembler! or interfacing to C! or integer wraparound!"