FSharp.Data.SqlClient
FSharp.Data.SqlClient copied to clipboard
Question: Why is FSharp.Data.SqlClient.DesignTime implemented as a class
I was wondering why FSharp.Data.SqlClient.DesignTime and friends are implemented as a class with a private constructor instead of simply being a module with let bound functions.
Wouldn't this be more terse?
// static class
type DesignTime private() =
static member internal GetRecordType(columns: Column list, ?unitsOfMeasurePerSchema) =
...
// module
module DesignType =
let internal GetRecordType(columns: Column list, ?unitsOfMeasurePerSchema) =
...
I was thinking its because the members can use each other?
Not sure about original decision, but yes it seems calls to those static members happen in some of those.
Looking for DesignTime. in that file brings few calls although they are probably just top level calling lower level or utility functions, those same members are called in the provider themselves.
I haven't spent time trying to figure out if there are logical groups of functions that would be better grouped in a module, but if you have some good suggestions or a PR to review, please let us know.