News Score: Score the News, Sort the News, Rewrite the Headlines

Parser Combinators Beat Regexes

Someone online was solving Advent of Code problems, and had a question about last years’ day 3. They had a working solution using regular expressions (regexes) on String values, but they wanted to use ByteString values instead for performance reasons. They were surprised, however, that there seems to be a lack of community cohesion around regex libraries in Haskell. There’s a reason for that. We generally don’t use regexes in Haskell. We use parser combinators instead, because they are almost al...

Read more at entropicthoughts.com

© News Score  score the news, sort the news, rewrite the headlines