Replies: 1 comment
-
Hello @jkone27 , would you mind giving a few specific examples in the form of "convert from: ... to: ... " ? Also what call sites would you have in mind for the conversion? When it comes to method arguments, some directions (depends on the examples) are solvable by op_Implicit conversions, the compiler can apply those automatically in some scenarios. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Many times interop with .NET collections from libraries or C# code is not transparent for F# devs , https://devonburriss.me/converting-fsharp-csharp/
This would reduce entry barrier for developers not coming from .NET, as they see so many types between e.g. a nuget package and F# codebase, they get confused on which one is which, and compiler nowadays helps but only to a small extent.
This could reduce the entry barrier for new F# developers coming from other languages quite a lot, and eventually maybe improve also other areas like EF entity framework interop e.g. on ICollection stuff?
is there ways tooling could help here, suggesting appropriate automatic conversion for each types when doing interop, i know it's probably quite a big feature but wondering if compiler does not make "transparent" such conversions/casts because we want to make all explicit and clear, then it is also an extra burden for developers and cognitive knowledge to know how and which conversion to use?
maybe F# could have a general approach of conversion that could be disabled for performance reasons from fsproj with a flag?
like
<DisableCollectionsAutoConversion>true</..>
in fsproj,but otherwise try to have the compiler cast or convert such for users when interoping with C#/.NET code directly from compiler side?
Beta Was this translation helpful? Give feedback.
All reactions