I think Haskell has something similar, the standard Read typeclass:
http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#t:Read Bye, bearophile
I think Haskell has something similar, the standard Read typeclass:
http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#t:Read Bye, bearophile