Hacker News new | past | comments | ask | show | jobs | submit login

> Sequencing parsers applicatively allows the compiler to perform static analysis on a parser without running it. This knowledge can be used to avoid things like backtracking that may slow your parser down. This is not possible when sequencing parsers monadically because the grammar of each parser depends on the previous one. However, performance results in this case are probably negligible; don’t hesitate to choose do-notation if you find it easier to read.

Would be good to talk more about this and quantify too. Very interesting topic.




Maybe this paper[0] on using Applicatives for performance and concurrency in Haskell's Haxl will help.

Also note that there is a feature proposal[1] for Applicative Do notation.

0: http://community.haskell.org/~simonmar/papers/haxl-icfp14.pd...

1: https://ghc.haskell.org/trac/ghc/wiki/ApplicativeDo




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: