
On 4 October 2011 09:41, David Townshend aquavitae69@gmail.com wrote:
Same functionality, but try_convert is a function with lots of arguments whereas my alternative is an expression. But to be honest, I don't really like either. In cases that require the level of control that try_convert provides, the try statement is cleaner. The point I'm really trying to make is that my initial proposal was for a specific but common use case (float and int), not a general-purpose conversion tool.
I think the point you're missing is that most people here don't see using a default in place of garbage input (as opposed to just for empty input) as a "common" use case. Certainly not common enough to warrant a language change rather than a private utility function...
Paul.