I am new to F#, but have been a dotnet Dev for a few years with Vb.NET and C#. I’ve been teaching myself F# over the past few weeks because I like the idea of functional programming for some of the work I do.
Being that F# can use dotnet core libraries, but is not really used as an OOP language, it made me ask the question: “Is F# using C# dotnet libraries, or have dotnet libraries been rewritten in F# for F#?”
I understand the dotnet core libraries are all compiled into CLR, but was just specifically curious if F# is merely using classes and libraries written in C# (or C++) or those are native F# libraries. Kind of a silly question but it would be interesting to know from an architecture standpoint.
An example is the Console.WriteLine
. When you use this in F#, is this a C# implementation that F# is using? Or is Console.WriteLine
in F# natively written in F#?
Microsoft states F# is a functional-first language with features and idioms for both functional and object-oriented programming. It has been designed for functional programming on .NET while also offering clean interop with C# and existing codebases.
Reference: https://dotnet.microsoft.com/languages/fsharp
Appreciate the responses.