You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AutoOpened modules in F# won't work in C#, in the way you have to explicitly type out the static class name that was compiled, creating a lot of noise and reduce the interoperability in terms of being convenient to use F# codes in C# whilst they're all part of the .NET Eco System.
People who are used to auto open module in F# might also have class names that's hard to type or even random guid :
which is unusable in C# because you can't type the static class name, unless you get around it by honoring the auto open attribute
Allow me to shed some light in the scenario when people are using guid as module names in F# :
F# currently doesn't let you have the same module name in two separate files if these modules are under the same namespace, which we are used to in C# by declaring a class as partial and many might agree it's a useful feature. The reason for doing this generally is separating the implementation in different files so it's more organized. (E.g. Light.frequencyTranform / Light.separateFrequency are two functions that belongs to the module Light but put in separate files)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
AutoOpened modules in F# won't work in C#, in the way you have to explicitly type out the static class name that was compiled, creating a lot of noise and reduce the interoperability in terms of being convenient to use F# codes in C# whilst they're all part of the .NET Eco System.
People who are used to auto open module in F# might also have class names that's hard to type or even random guid :
While this is compiled, it looks like this for a C# project :
which is unusable in C# because you can't type the static class name, unless you get around it by honoring the auto open attribute
Allow me to shed some light in the scenario when people are using guid as module names in F# :
F# currently doesn't let you have the same module name in two separate files if these modules are under the same namespace, which we are used to in C# by declaring a class as
partial
and many might agree it's a useful feature. The reason for doing this generally is separating the implementation in different files so it's more organized. (E.g. Light.frequencyTranform / Light.separateFrequency are two functions that belongs to the moduleLight
but put in separate files)Beta Was this translation helpful? Give feedback.
All reactions