dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.85k stars 776 forks source link

How did you start using F#? #2766

Closed matthid closed 7 years ago

matthid commented 7 years ago

Inspired by https://github.com/Microsoft/visualfsharp/issues/1339 and all the other parts we maybe should ask how existing F# developers were "convinced" to start using F#. I think this might bring some insights in how more people can be attracted.

So I'll start with my story:

If someone has an idea to aggregate the data later let me know.

jmmk commented 7 years ago

A few years ago I got interested in functional programming. I read about different languages and eventually settled on Clojure. Immutable data really clicked with me and I liked the FP model. I liked that Clojure was pragmatic - allows mutability where necessary, has a very strong interop story with both JS and Java.

The huge downside of Clojure (and dynamic languages in general) was in refactoring - it was very painful and it drove me to look at statically typed functional languages:

I tried F# and it was pretty much everything I liked about OCaml and Clojure combined into one:

charlesroddie commented 7 years ago

Around 2009, looking for a language with less debugging pain than Mathematica but more intelligent than C#. Read Jon Harrop's F# for scientists and was amazed by the recursively defined types. Combination of powerful, safe and easy types is a great one. Found with F# I have to think hard about a problem at the beginning, but then implementation is quick and often works first time.

SaxxonPike commented 7 years ago

I worked at a (primarily) Ruby shop in 2015. We ended up getting a Haskell project because someone on our team was very knowledgeable about it. I learned a bit about functional programming as a result, and wanted to leverage my investment in the .NET Framework while also experimenting with functional programming. F# was the perfect fit. I used it to write a 6502 emulator, with great success.

mpodkolzin commented 7 years ago

Does anyone have warstory of how you convinced C# oriented team to switch (at least partially) to F#? So far as I read F# is either used for pets projects or when app is build in f# from scratch. I wrote two DSLs for our testing and delpoyment in F#, but struggle with teammembers and management to approve f# for produciton use.

cartermp commented 7 years ago

@selketjah May have a good story here, @mpodkolzin. She gave a great talk/had a great story to tell in this talk. Aside from being a great talk, the subject matter seems spot-on with how you get F# into a C#-oriented codebase and workplace.

jackfoxy commented 7 years ago

I took a hobby project off the shelf that I hadn't thought about in a couple of years, and found I was trying to express my ideas by passing around functions in C#, which is painful. I had heard F# was a functional language and available in VS 2010. I really didn't know what that meant, but I started studying blog posts, mostly about monads, and studying the code base of FParsec. I guess it's sort of a miracle that I stuck with F# after that! But eventually I came to believe it was the future of software engineering and I even went so far as to quit my job and go on a 7 month sabbatical to study F#. A year after that I got hired into a startup that was dedicated to using F# in house.

cboudereau commented 7 years ago

I have started with unit testing due to quick comparison, tuples, and fscheck for property based testing. Then after that, I had used fsharp with csharp in order to quickly integrate partner API.

Actually, I had used fsharp for 3 years in prod (20 apps). First experience thanks to fsharp.data xml and json type provider. 12Mrq/day.

I use fsharp to script or estimate how integrate a web api, build POC, live coding session. I use fsharp for hackathon like expedia prague hackathon...

I had used fszmq for an application which takes around 240msg/s. It works just fine.

Thanks to partial application and higher order function there is no need to use an IoC container so the complier do the job and refactorings are quick.

I would like to have higher kinded types (ie:generic of generic) and traits (ie:static interface) but I think this features are planned.

The last but not least : Canopy and fsharp repl properties fit just fine for scrapping. You can quickly scrap or test a lots of websites because you can build and execute your code along an opened browser.

Except fszmq, fsharp.data and canopy have not csharp equivalent (with the same experience and productivity)

AviAvni commented 7 years ago

I started to learn F# in 2012 with a book because I wanted to learn another programming language And because I wanted to learn different paradigm then OOP The first and most exciting real thing that I did with F# is contributing to this repo Thanks to @latkin that help me with that and to the F# Software Foundation for selected me to the mentorship program

cisterni commented 7 years ago

It was 2001 when I first met @dsyme at Microsoft Research and he was working on ILX, a variant of the Intermediate Language for .NET supporting functional programming abstractions. Back then he was able to bootstrap ML on ILX. In 2006 I was in Cambridge presenting work on .NET and robotics when I met Don again and he introduced me to F#. We had a very intense discussion about the syntax of the language at Eagle Pub... and I was too C#ish to fully appreciate F#, even though I fell immediately in love with the F# interactive. As soon I went back home I started F# programming and wrote a Mandelbrot viewer and really appreciated the language. Don asked me to contribute to Expert F# project and I jumped in an instant. In 2008 I started using F# for teaching UI programming course at University. Since then I'm using almost only F# and Javascript (TypeScript now) as programming languages. My latest project has been DB oriented data processing using fsi (about ten million records for land tax processing for entities related to half of Tuscany Region government).

d-saravanan commented 7 years ago

I started with a Scala course and found it different from the .net style. Found that people were using F# got some good video on F# by Scott and started, initially, it was like what a weird error message, but later learned to understand and did well.

I have written something similar to the fluent migrator in F# and also couple of helpers and shared libraries in F# and waiting for them to go on a public release. It is really terse and less code and less trouble compared to C#. However, see that some of the features are coming to C#.

Inspired by the work by Mathias Branderweiner on F# and ML,i have started to learn ML and hoping to get into ML with F#

That's my story on F#.

jon49 commented 7 years ago

I was writing VBA and looked into projects surrounding writing Excel applications/Add-ins as VBA wasn't powerful enough for what I was doing. Started doing VB.NET, used C# when I had to. Then I came across people using F# with Excel. Then I started incorporating F# into my projects. Then I got my first full time programming Job as a Node.js developer porting projects from C#. But my lead left and I was pretty much just recreating .NET in Node.js (unbeknownst to me when I was writing the code). So I ported it back to .NET, except this time in mostly F#!

Since then I have a new job where I write both F# and C# and a ton of T-SQL. My boss/owner just discovered Kotlin and is utterly convinced in the value of it over Java. So, maybe soon I'll get to write mostly just F# again :-)

cartermp commented 7 years ago

Just wanted to say that this thread is both fun and inspiring to read. Love seeing so many varied stories.

cmbrown1598 commented 7 years ago

I have been a C# developer, and a happy one for 15+ years. A new friend came into my work life, and introduced me to Clojure. I absolutely hated the syntax of Clojure, and I really didn't want to compile down to Java or Javascript, but loved all the ideas of functional programming. I wanted to learn how to get the benefits of a functional language, but in a more "succinct" syntax, and without throwing away all my .NET knowledge. Welcome, F#!

cartermp commented 7 years ago

Closing old (but great) discussion.

srid commented 3 years ago

Some renewed discussion on this here: https://lobste.rs/s/iudktk/how_did_you_start_using_f