For example, if I wrote a module in F #
module Lib
type A =
member this.x1 x = ...
let helpa x = ...
let helpb x = ...
type B =
member this.y1 x = ...
let helpc x = ...
typeA with
member this.x2 x = ...
typeB with
member this.y2 x = ...
Works well in F # on open Lib. However, if I want to use it in C # (where I am only interested in types and member functions in Lib), every time I create a type, I have to new Lib.A(...). This becomes quite annoying, so module names cannot be ignored. Calling a static method, such as Lib.A.C(), is even more complicated.
Then I try to replace modulewith namespace, every time I introduce some helper functions, I need to create a new module with a new name. Sometimes I manage to rearrange all auxiliary functions in 1 module, but this will lead to the fact that the code will be less clear.
What would be better for this?
: Using * = Lib.* #.