Should one wrap type providers containing values that have side effects inside a class?
问题 I am trying to implement in my code the excellent advice in the F# coding conventions page https://docs.microsoft.com/en-us/dotnet/fsharp/style-guide/conventions. The section Use classes to contain values that have side effects is particularly interesting. It says There are many times when initializing a value can have side effects, such as instantiating a context to a database or other remote resource. It is tempting to initialize such things in a module and use it in subsequent functions.