
The Early History of F# [pdf] - ingve
https://fsharp.org/history/hopl-draft-1.pdf
======
mamp
A really interesting and honest write up by Don Syme on the goals and trade-
offs required to get a functional language implemented on .Net, in pre-open
Microsoft.

I use F# for anything critical and/or complex. It's a parsimonious way to
represent domain models and a clear way to express computation.

My main regret with F# is that I didn't get into ML languages earlier in my
career.

BTW a recent book, 'Stylish F#', is the best introduction to F# so far (no
affiliation, just bought a lot of F# books over the years).

[https://www.apress.com/gp/book/9781484239995](https://www.apress.com/gp/book/9781484239995)

~~~
kiteason
Author of 'Stylish F#' checking in. Thanks for the endorsement!

Incidentally 'Stylish F#' is intended to be an intermediate book so it might
be worth reading Chris Smith's 'Programming F#' or one of the other intro
books first - or some beginner online material. That said if you had C#
exposure and were determined, you could probably get away with using 'Stylish
F#' as your intro.

------
avinium
I've been slowly migrating from C# to F# for our automation assistant
([https://lexico.io](https://lexico.io) \- not yet usable yet but will be
soon), and like the top comment here, my only regret is that I didn't do so
sooner.

Functional languages allow logic to be expressed so precisely and concisely. I
hazard a guess that every F# module is 2/3 the LOC of its C# equivalent, with
the added advantage that everything is incorporated into a single file.

F# certainly has its quirks (as a language, I think Clojure is actually
cleaner - but that comes with the downsides of the JVM and .NET interop is a
huge advantage).

Part of me doesn't want to spread it around too much, because I feel like I've
discovered some hidden edge over my hypothetical competitors.

~~~
astine
_I think Clojure is actually cleaner - but that comes with the downsides of
the JVM and .NET interop is a huge advantage_

There is a dotnet implementation of Clojure if you're interested:
[https://github.com/clojure/clojure-clr](https://github.com/clojure/clojure-
clr)

~~~
pjmlp
I usually lags behind the official Clojure implementation.

------
adgasf
We are currently rewriting Buckaroo in F#
([https://github.com/LoopPerfect/buckaroo/tree/buckaroo-
redux](https://github.com/LoopPerfect/buckaroo/tree/buckaroo-redux) );
previous versions were in modern Java. The productivity gains are
tremendous... FParsec, async, asyncSeq, records, match expressions are all a
huge leap over what most OOP languages offer. Deployments are also much easier
thanks to Core RT.

F# feels like a secret weapon.

~~~
dmead
I want to ask an annoying question.

Why F# and not haskell?

~~~
BeetleB
Not OP, but some reasons usually thrown around:

F# has the power of .NET and its libraries behind it.

Haskell's insistence on purity and laziness does increase the time it takes to
design things well. F# makes it easier to violate purity in controlled ways,
and is not lazy be default.

People who've used both say it's a lot easier to get lost in abstractions with
Haskell, and there doesn't appear to be a clear "stopping" point. A common
statement by people who move from Haskell to OCaml/F# is "I spent N years on
Haskell but didn't produce much. In 6 months of (OCaml|F#) I've produced more
than in those N years with Haskell."

The bottom line: The .NET libraries and slight relaxing of purity/laziness
allows for more productivity.

(I'm not an expert on either - just repeating what you normally find in the
threads).

------
melling
“Since around 2007 strongly-typed functional programming has shifted from
relative obscurity to be a central paradigm in programming. C#, Java, C++,
Scala, Kotlin, Swift, Rust and TypeScript now all include elements of
strongly-typed FP, and Apple executives extolled functional features at the
launch of Swift in 2014, including pattern matching, generics, option types,
type inference, tuples and closures, something unthinkable in 2005.93 Haskell,
F# and OCaml have all grown in use, and newcomers such as Elm and ReasonML are
also finding good adoption.”

I feel like we’ve taken the long way to popularize functional programming.

~~~
ChrisSD
Class based OOP had held a tight grip on developer mind share since the 90's
at least. Breaking that grip is a slow process.

~~~
pjmlp
Yes, although the 90's also had other models of OOP, they just failed to gain
mindshare.

The most mind blowing variant was BETA, but I guess pattern based OOP was
probably a bit too much for the common dev.

------
gazarullz
I worked quite a bit with F# and Scala.

I really like F# pipelines and function declaration syntax.

On the other hand I've found Scala's case classes cleaner than F#'s (maybe
that's because I am coming from an OOP world).

Additionally F# has a cleaner pattern matching compared to Scala.

Both languages have very good support for actor model concurrency (love akka
actors and .net agents)

I think that if F# would have had a rich ecosystem the way Scala has, it could
become a real contender.

(my 2 cents on F#)

~~~
bad_user
I think Scala's pattern matching is pretty cool too. I was surprised by how
weak Haskell's pattern matching is by comparison (by default, I don't yet know
of any GHC extensions that could help).

That said F# and Scala aren't really competitors. The real competitors are the
mainstream languages, like JavaScript, Java, C# and Python and that's what
their marketing should target.

~~~
Tarean
Pattern synonyms are really expressive but the complex version is kinda
headache inducing:

[http://hackage.haskell.org/package/lens-4.17/docs/src/Contro...](http://hackage.haskell.org/package/lens-4.17/docs/src/Control.Lens.Cons.html#%3A<)

This creates a bidirectional pattern synonym - you can both match and
construct values with it:

    
    
        foo :: Cons' s Char => s -> s
        foo (a :< b) = 'c' :< b
        foo other = other
    

Pattern synonyms make completeness checking undecidable so you need to give
manual hints to get a nice api. It also wreaks cost models - is foo O(1) or
O(n)?

------
phillipcarter
For anyone interested in how some of the modern history is shaping up from a
language perspective, check out the Language RFC repo:
[https://github.com/fsharp/fslang-design/](https://github.com/fsharp/fslang-
design/)

------
Nelkins
Funny to see early predictions about the .NET ecosystem:

"Perhaps I am wrong, but let me state what I believe about this stuff. ...C#
is not really important as it will never reach the 'mass' of VB..."

~~~
bunderbunder
I think that the early expectation was that, since (non-.NET) Visual Basic was
being sunsetted at the same time, VB6 developers would quickly adopt VB.NET,
and that would lead to VB quickly becoming the most popular .NET language.

Which, yeah, proved to be hilariously wrong. Here we are in 2019, and I can
_still_ name several actively maintained applications that are written in VB6.

Another thing they couldn't have really known at the time was how exactly C#
and .NET would evolve over the following decade. Once upon a time, interacting
with COM interfaces was much easier in VB.NET than in C#, and that made it
relatively more attractive as an enterprise dev language. C# 4 more-or-less
closed that gap -- VB.NET's other practical advantages are so minor they don't
really even bear mentioning.

------
davidwihl
My recollection is that .NET was largely a research project within Microsoft
around 1997. It was when ScottGu used .NET to build ASP.NET (circumventing
many limitations of Classic ASP that he also helped build) that .NET took off
as a viable commercial platform ushering in further development and extended
language support including F#.

~~~
pjmlp
.NET percursor, Ext-VOS was supposed to be an improvement on COM, COM Runtime.

Then they pivoted it into a managed runtime.

------
Timothycquinn
Excellent article. Kudos to the authors. I look forward to digging into your
references.

This would be a great primer for young developers to get a good overview of of
programing paradigms and modern OS language evolution over the last 25 years.
I will be sending this along to all my peers.

Also, I am impressed with .NET and Microsoft's embrace of OpenSource. I am one
of those developers who got stung by Microsoft in their earlier days when they
were the true Evilcorp and now they really seem to be less evil with this
embrace.

I will actually consider using F# for my future projects, but of course as
long as it runs 100% on *Nix platforms.

------
mlinksva
Don Syme talks a bit about this paper at the beginning of
[https://www.youtube.com/watch?v=aw2BAxG3bdM](https://www.youtube.com/watch?v=aw2BAxG3bdM)
from a recent F# conference.

He also talks about F# history in a 2016 interview
[https://channel9.msdn.com/Shows/On-NET/Don-Syme-
on-F](https://channel9.msdn.com/Shows/On-NET/Don-Syme-on-F)

------
bachmeier
How is this from 2002 if it talks about events through 2018?

~~~
nuclx
The date tag wasn't there previously. Someone added it by mistake as it seems.

~~~
sctb
Removed!

