F# for Python Users
In my opinion, targeting Python users has a lot more potential than introducing F# to C# developers as a better C#.
My reasoning for this assumption is this:
- Use C# mostly in at work.
- Often not incentivized to try a new language unless it helps them find a better job/make more money.
- At first glance, the advantages of F# over C# might not be apparent to C# developers. Especially now that C# is tagging on more and more functional features.
- Huge open source community
- More eager to try something new
F# addresses Python's pain points
Also, Python has a few real pain points that F# directly addresses:
- Many want the safety of static typing, but find the available options tedious
- F# Solution: Type inference ("All the advantages of types without the ceremony").
- Slow execution, especially in parallel
- F# Solution: Much faster execution and Async.
- Hard to debug, "refactoring angst" for fear of breaking things.
- F# Solution: Safety features like static typing, exhaustive pattern matching and Option types. Get a piece of mind that everything just works before you even run your program.
- No convincing story on mobile for SPA's:
- F# Solution: You can use (almost) the same code on the backend, frontend, and on mobile. Everything stays in sync.
F# is similar to Python
In addition, F# is similar to Python in ways Python users value very much:
- Significant whitespace: F# code won't look alien.
- "Batteries included": Everything you'd ever need is just an "open" statement away. By this I mean all the NET libraries, but I won't mention the name, at least not on the landing page.
Present the biggest advantage first
Of these features I would take one or two and make a very bold headline to hook Python users in. Maybe something like this:
All the advantages of static typing without the ceremony (on the frontend, backend, and on mobile).
Use code examples to convince
Right below the headline, I think it would be interesting to lead with a short example, placing the code of F# and Python side by side.
Then you could say: "See, the F# version looks just like Python, but it's statically typed automatically without you having to add any annotations".
Or, you could pick an example that also shows the beauty of exhaustive pattern matching and Option values.
Then you could say: "Not only is the F# code statically typed out of the box, but you can be sure it won't blow up in production due to a null value or code branch you missed.
What about machine learning?
As I have no experience with machine learning I cannot comment. But I think that adding a code example using units of measure would be extremely convincing, especially if placed side by side with the same code written in Python. Even better, a code example that has a bug in the Python version that won't be possible using UOM's.