Comment on CShell: A simple, yet powerful, C# scripting IDEparentComments−profquail12ySo it's not actually the type inference that's the problem -- it's developers who carelessly define implicit conversion operators on their classes.−JoeAltmaier12yStrings have built-in conversion, right?−nanofortnight12yThe only built-in implicit conversions in C# are for numerics, and there isn't a loss in precision for those (with the exception of int/uint/long/ulong -> float and long/ulong -> double, where there is a loss of precision).http://msdn.microsoft.com/en-us/library/y5b434w4.aspx int i = "5"; would not work.−recursive12yNot the kind you seem to be thinking of.
Comments
So it's not actually the type inference that's the problem -- it's developers who carelessly define implicit conversion operators on their classes.
Strings have built-in conversion, right?
The only built-in implicit conversions in C# are for numerics, and there isn't a loss in precision for those (with the exception of int/uint/long/ulong -> float and long/ulong -> double, where there is a loss of precision).
http://msdn.microsoft.com/en-us/library/y5b434w4.aspx
would not work.Not the kind you seem to be thinking of.