Add support for implicit operators to facilitate language interop
Add support for implicit operators to facilitate language interop instead of having to write an explicit operator like:
I'm not proposing to relax strong typing but to add someway to ease language interop.
I don't see why we can't have something like an [<AllowImplicit>] that would be able to handle implicit operators without sacrificing type safety. In this way you need to opt-in for the desired behaviour
The null keyword is a valid keyword in the F# language, and you have to use it when you are working with .NET Framework APIs or other APIs that are written in another .NET language. The two situations in which you might need a null value are when you call a .NET API and pass a null value as an argument, and when you interpret the return value or an output parameter from a .NET method call.
Daniel Fabian commented
I agree, the work-around with a local operator using duck-typing seems like a small cost, when compared to losing the very strong typing we have right now.
Richard Minerich commented
Please no, I don't want any implicit conversions ruining my type safety.