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.

1

1 Answer 1

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.

sourcenouveau
6,5104 gold badges33 silver badges44 bronze badges
answered May 6, 2015 at 15:33
2
  • Notice that older versions of GCC had an old gcj compiler able to compile an old Java standard program to some native executable. Commented May 6, 2015 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. Commented Sep 18, 2015 at 16:43

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.