
4 Aug
2010
4 Aug
'10
1:53 p.m.
On 4 August 2010 18:40, Alexander Dunlap
It's also nice for people reading code if common functions are functions from common libraries. This allows readers' "vocabulary" of common functions to increase, so they don't have to trawl through someone's personal "utility" library to figure out what each utility function does.
Agreed. That's why I like readMay. There are many ways to write a reads wrapper: case reads str of [(x,_)] -> Just x; _ -> Nothing vs case reads str of [(x,"")] -> Just x; _ -> Nothing -- stricter Etc. It seems everyone defines their one, where as Safe.readMay is common. There could be others defined in Safe that encompass most cases.