
The Naked Truth About Writing a Programming Language (2014) - todsacerdoti
https://digitalmars.com/articles/b90.html
======
ken
2 weeks ago:
[https://news.ycombinator.com/item?id=23053773](https://news.ycombinator.com/item?id=23053773)

------
mathgladiator
Having started a serious programming language, I am finding truth in writing
the parser myself. I started with ANTLR, and while it helped me go fast, it is
slowing me down now in some features. For instance, sane error messages are an
exceptionally hard problem.

I'm finding wisdom is stopping on the first parse error because if you try to
fix those on the fly, then you are just creating more junk. It is better to
make parsing super fast and done up-front because then you don't waste your
time debugging non-issues.

Once parsing happens, the same philosophy applies to type checking. Spool out
the first error within a sub-tree, and move onto the next sub-tree.

------
heavenlyblue
> Most compilers’ follow on messages are so bad that the practical programmer
> ignores all but the first one anyway.

Because the only reason I would build a new programming language is only for
it to not be worse than others?

