0

Does F# like C# requires .NET framework to run? According to Wikipedia as stated below, F# is mostly used as a CLI language which means that it is used mostly with .NET. But it also states that the F# foundation provides a compiler for F# separately.

F# is most often used as a cross-platform CLI language, but can also be used to generate JavaScript and GPU code.

F# is developed by the F# Software Foundation,[6] Microsoft and open contributors. An open source, cross-platform compiler for F# is available from the F# Software Foundation. F# is also a fully supported language in Visual Studio and Xamarin Studio. Other tools supporting F# development include Mono, MonoDevelop, SharpDevelop and WebSharper.

Does it mean that F# can be used like unmanaged code similar to C++ and C. I am a total newbie to the .NET platform.

4

Does it mean that F# can be used like unmanaged code similar to C++ and C?

Theoretically, yes. Practically, no.

Languages often don't specify how they're compiled. There's nothing precluding you from taking the syntax and semantics of Java or C# and have them compile down directly to x86 assembly and avoid the need for the JVM or .NET runtime.

That said, such a compiler doesn't exist (as far as I know) - so if you want that functionality you'll need to spend a few years to decades building it yourself. And I would question any reason for thinking you'd want that in the first place.

| improve this answer | |
  • Notice that older versions of GCC had an old gcj compiler able to compile an old Java standard program to some native executable. – Basile Starynkevitch May 6 '15 at 15:49
  • A question is what used like unmanaged code similiar to C++ and C even means. Someone can just statically link and embed the runtime into an executable. So it is still a managed language with a runtime, but contains everything and didn't need a separated installed VM. – David Raab Sep 18 '15 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.