What I wish I knew when learning F#

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SonarLint - Clean code begins in your IDE with SonarLint
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
  • VisualFSharp

    The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio

    You can simply contribute to https://github.com/dotnet/fsharp/, the maintainers are very friendly to new contributors in my experience (though the codebase is old and often quite hard to understand).

  • dbcore

    Generate applications powered by your database.

    I've had good experiences running F# on Linux. I used it to build an API generator from database schemas.

    Same as Go you can get a single static binary you can copy anywhere.

    It's very convenient and you've got a massive number of .NET APIs to fall back on.

    The language is a little complex though. That you cannot call interface methods on an object implementing the interface without explicitly casting to the interface [1] is pretty weird. And getters/setters are a little complex.

    If you want an easy introduction to the ML family for educational/historic sake I'd always recommend Standard ML.

    But if you want a highly pragmatic, mature, strictly typed, compiled cross-platform language F# is pretty compelling.

    [0] https://github.com/eatonphil/dbcore

    [1] https://docs.microsoft.com/en-us/dotnet/fsharp/language-refe...

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • babashka

    Native, fast starting Clojure interpreter for scripting

    There are multiple options to approach the Clojure* ecosystem. But yes, it is more focused towards dedicated and experienced developers overall. I use IntelliJ Idea + Cursive for development and that seems quite comfortable. I have a very rough sketch of the environment setup for a real app here: https://www.orgpad.com/s/hfxYQYkcLYV We use a similar setup to develop OrgPad itself.

    You can use Babashka https://github.com/babashka/babashka for a quick and dirty setup to get you up and running quickly. That is also useful for scripting some things. You might also try shadow-cljs + ClojureScript, if you are more at home in the Node.js/ Browser JavaScript ecosystem and want to do something with it. There is a new "(Not)Babashka" but built on ClojureScript: https://github.com/borkdude/nbb that might be interesting as well.

    I have found this video by James Trunk: https://youtu.be/C-kF25fWTO8?t=848 to have a very nice live coding example.

  • nbb

    Scripting in Clojure on Node.js using SCI.

    There are multiple options to approach the Clojure* ecosystem. But yes, it is more focused towards dedicated and experienced developers overall. I use IntelliJ Idea + Cursive for development and that seems quite comfortable. I have a very rough sketch of the environment setup for a real app here: https://www.orgpad.com/s/hfxYQYkcLYV We use a similar setup to develop OrgPad itself.

    You can use Babashka https://github.com/babashka/babashka for a quick and dirty setup to get you up and running quickly. That is also useful for scripting some things. You might also try shadow-cljs + ClojureScript, if you are more at home in the Node.js/ Browser JavaScript ecosystem and want to do something with it. There is a new "(Not)Babashka" but built on ClojureScript: https://github.com/borkdude/nbb that might be interesting as well.

    I have found this video by James Trunk: https://youtu.be/C-kF25fWTO8?t=848 to have a very nice live coding example.

  • SharpLab

    .NET language playground

    The language, in general, wants you to be explicit about what you're working with. So implicit access to interface members isn't a thing, you need to say that "x is this interface type" or cast.

    In F# 6 things are changing a bit, and may possibly change in the future. There are various classes of cases where the type information is known, but the compiler still required you to explicitly cast things to be happy. That's no longer case. This link[0] has 3 examples that don't compile with F# 5 but will compile with F# 6.

    [0] https://sharplab.io/#v2:DYLgZgzgNALiBOBXAdgHwPToAQFMAeAhgLYA...

  • FStar

    A Proof-oriented Programming Language

    It's also important to add F# is an inspiration for an amazing MS Research effort, F* [1].

    Furthermore, it is also worth checking Dafny [2] (Spec#'s successor). The relationship between Dafny and C# is equivalent to the relationship between F* and F#. Both languages try to refine their predecessors semantics and augment them with practical constructs to prove program correctness.

    Some of the largest software artifacts ever verified have been implemented in Dafny [3].

    [1] https://www.fstar-lang.org

    [2] https://dafny-lang.github.io/dafny/

    [3] https://www.cs.columbia.edu/~junfeng/17sp-e6121/papers/ironf...

  • dafny

    Dafny is a verification-aware programming language

    It's also important to add F# is an inspiration for an amazing MS Research effort, F* [1].

    Furthermore, it is also worth checking Dafny [2] (Spec#'s successor). The relationship between Dafny and C# is equivalent to the relationship between F* and F#. Both languages try to refine their predecessors semantics and augment them with practical constructs to prove program correctness.

    Some of the largest software artifacts ever verified have been implemented in Dafny [3].

    [1] https://www.fstar-lang.org

    [2] https://dafny-lang.github.io/dafny/

    [3] https://www.cs.columbia.edu/~junfeng/17sp-e6121/papers/ironf...

  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

  • interactive

    .NET Interactive takes the power of .NET and embeds it into your interactive experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.

    There's definitely room for a book or blog series along the lines of "F# for python programmers" or something.

    Unfortunately there's some level of .NET tooling you need to understand before you can do much today, and several .NET concepts creep in with that.

    The good news is that .NET Interactive is shaping up to be a great way to avoid most of that. At least so far all you need to do is install the .NET SDK, then install a VSCode plugin and you're good to go - just write code like you would in a python notebook, and acquiring packages is even easier than in Python: https://github.com/dotnet/interactive#notebooks-with-net

  • Giraffe

    A native functional ASP.NET Core web framework for F# developers.

    I was thinking as a strategy that would impact the way all libraries are build. In my example I posted above, there is no dotnet code showing. Its all abstracted. Libraries should create new APIs that are just wrappers around the dotnet library.

    Whereas, if you look at the examples in the Giraffe framework, you need to do a bunch of dotnet boilerplate. https://github.com/giraffe-fsharp/Giraffe#doing-it-manually

      open System

  • conjure

    Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile)

    Thanks for the links, neighbor.

    Borkdude is a total boss; babashka and clj-kondo are amazing.

    Also, don't get me wrong, I reiterate that I already love clojure, I just wish there were fewer and lower barriers for others to join in.

    I realize there are already people on that case like https://practical.li/, and are doing an excellent job. I also think that things like https://github.com/Olical/conjure are pretty awesome, being predominantly a vimmer.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts