News for hackers. Stuff that matters.
Re:Roc rewrites the compiler in Zig by debugnik on Tuesday February 04, 2025 @03:42PM (#42938290)
> we also want to convert [the parser] to use recursive descent; it was originally written using parser combinators

Almost all parser combinators are recursive descent with backtracking, they just add higher-order plumbing.

I have a feeling that whatever issue they've encountered with the combinator approach could have been worked around by handwriting only a few pieces.

Re:Roc rewrites the compiler in Zig by wirrbel on Tuesday February 04, 2025 @03:48PM (#42938389)
When I used parser combinations in rust years ago the compile times were really long. In also think it’s a strange reason to move away from rust as a language.
Re:Roc rewrites the compiler in Zig by bhansconnect on Tuesday February 04, 2025 @05:37PM (#42940067)
This is more about simplicity, maintainability, and possiblity for new contributors to easily jump in and fix things. Our current parser is not fun for new contributors to learn. Also, I think parser combinators obsficate a lot of the tracking required for robust error messages.

Personally, I find parser combinators nice for small things but painful for large and robust things.