On Thursday, 14 January 2021 at 20:21:42 UTC, Daniel N wrote:
On Thursday, 14 January 2021 at 17:51:51 UTC, Basile B. wrote:
This is the last[1] occasion to speak about a programming
language initiatly made in D, as the bootstrap phase is very
near.
I'd like to thank the D compiler developers, that let me work
on DMD even if I borrow another path.
[1] : https://gitlab.com/styx-lang/styx
Love the design FWIW.
Initially I wanted something like libdparse + dsymbol, i.e a
clean split of the AST the semantic phase, semi-success. There's
still a Symbol class but the types have been moved to the AST.
Another design idea is that I wanted to have useful visitors, i.e
that always process a whole compilation unit, but that did not
work well so now visitors are pretty much state-less and when a
"state" is required it is stored in scopes, "like in dmd". I
quote that because many times I've discovered that, in dmd, if
things are done in a way and not another, it's not arbitrary. The
main reason for that is that if you want to support out of order
declarations and "auto" you have to drive the semantics like in
dmd, declaration -> bodies -> statements -> expressions, and when
you reach something that is not known you launch this chain...