You are on page 1of 11

C# and F#

languages
History of the languages

C# F#
● Created in 2000 by Microsoft ● Started as strongly typed functional
programming in the 1970s
● Developed by Microsoft within its .NET
framework  ● F# started to run on .NET in 2002.
● Development team was led by "Anders ● Designed by Don Syme, a principal
Hejlsberg" in 2002. researcher at Microsoft Research
Cambridge
F# Advantages

Convenience Correctness
executes type inference, compiler will During the time capturing mismatch
show the error and suggest user to type at compile time removes an entire
supply a type of annotation class errors during run time

Completeness Functional
F# being a part of .NET gives Assists functional programming
users access to all third force build treating functions as values
C# Advantages

Ease of use Fast


functionality supports developing a Being an open source under the .NET
professional dynamic website, Windows makes c# run independently of
desktop applications, as well as games Microsoft which the language
on Unity Game Engine specifications, compilers, and related
tools are open source projects

Efficient secure
allows programmers to write a safe efficient code and does not permit any
type of conversions which might bring data loss and issues.
Disadvantages

C#
The code will need to recompiled
even when having a single change
which can be a hassle for users
because deploying a whole
application might take some time
which can lead the user to forget
testing and get some bugs
F#
A disappointing drawback of F#
crushing .NET legacy and doesn't
support functors which is a
problem for some users
comparing with Ocaml.
Loops

C# F#
Names (integer)

C# F#

int i = 0; let i = 0 or
let i = 0l
Functions

C# F#

int i = 0; let i = 0 or
let i = 0l
Functions

C# F#

int i = 0; let i = 0 or
let i = 0l
● basic comparison between F# and C#, the code below is simply adding off numbers from zero to
100:
Thank you

You might also like