I do not expect the language to recognize when a string is an integer and then convert it into one without telling me, and I would hate that if it happened.I mean, your example takes non-integers, and returns NaN using method two--obviously real code has to validation anyway.