All great points (although I'm not entirely sure what you have against PEGs), 
but even as an experienced programmer both in Nim and other languages I do 
sometimes want to just have the fish handed to me. Having a `parseInt` overload 
for char which just does the `ord` trick Yardanico showed (maybe with an assert 
to check that the character is actually in the range `'0'..'9'`) would be nice. 
I know how to do it myself, but sometimes it's nice to have things in a library.

And @xigoi, while `parseInt` might not be the perfect name for it I don't think 
anyone will see `parseInt(c: char): int` and be confused about what that 
function does. And in a way it does actually do parsing since it checks if c is 
in the correct range and converts it to a different value than what a normal 
`ord` would do.

Reply via email to