4 ms·
Regex combinators are quite common in functional languages (where it works quite better than in python). One particular advantage compared to Regex syntax is th
by Drup 9y ago
Regex combinators are quite common in functional languages (where it works quite better than in python). One particular advantage compared to Regex syntax is that you stay inside the language and only use function calls, so you get the documentation, typing and checking property of the language. I said a bit more about that here: https://news.ycombinator.com/item?id=12385840 https://news.ycombinator.com/item?id=12385840
- baq 9y agoso these would work great with python augmented with mypy.
- ivanbakel 9y agoMypy is pretty painful to use, though. The benefits of typing aside, patching it into Python has become too-little too-late, and everything feels like a kludge.
- rtpg 9y agoYou can get a lot of advantages of Mypy by combining it with a whitelist/blacklist (you can do this through a config file). Lots of missing stuff but with strict optionality alone you're gonna catch a lot of real world bugs
- baq 9y agoit's painful and in hindsight too late but i disagree that it's too little. i've been using it for about a year now and the amount of bugs it finds results in a (very) positive ROI; at $WORK new projects are now started with full mypy awareness from day 1 and old ones are being slowly but surely retrofitted.