Are there any good tutorials/guidelines for developing F# libraries? I’m considering porting some of my open-source Elm packages such as elm-geometry
to F#, but had a few questions like:
- What are the currently recommended ways to set up a library project? Some combination of
dotnet new
, Paket, FAKE…? - Are there good ways to publish for multiple .NET versions? I’d love to just stick to .NET 5 (or 6 once it’s out), but I’ll likely have to at least attempt to also build for .NET Framework 4.7. Is this possible using multiple build targets in FAKE or something?
- Are the Microsoft F# component design guidelines the best general source for library design best practices or are there others I should be checking out?
- One specific API design question - is it considered best practice to expose functions as both module-level functions and member methods on types? (So that you could for example write both
Vector3d.plus v1 v2
orv1.Plus(v2)
…)
I hope these questions make sense - I’m still trying to orient myself to the F# ecosystem in general so I may have made some bad assumptions.