▲ | giraffe_lady 9 days ago | |
The key thing for me in making this decision is of course predicting the future. Parsers are more work up front but in my experience much easier to debug, maintain and extend. So if I predict something will be around for a while I'll want to do a parser and if it's just a one-off I usually go with regex. Of course this predictably leads to me having a collection of parsers that I've never needed to touch again and a handful of monstrously complex regex grammars that I'll rewrite into a parser "the next time" I need to modify them. I still think it's the right thing to base the decision on I just need to keep improving my prophesying. |