3 ms·
500 lines struck me as particularly long, but I would use a combinator library like nom, and it looks like they are trying to do it from scratch.
by ModernMech 2y ago
500 lines struck me as particularly long, but I would use a combinator library like nom, and it looks like they are trying to do it from scratch.
- nine_k 2y agoHow large is the combinator library? It should not be excessively long, for the simple thing it normally does, especially in Rust which is FP-friendly.
- ModernMech 2y agoI've seen a capable combinator lib written in about 500 lines of Rust. Probably could be shorter if minimal loc were a goal. The one I use is called "nom", it's very general and has a lot of built in functionality and options, so it's much larger than 500 lines to be sure.