←back to thread

Why F#?

(batsov.com)
447 points bozhidar | 4 comments | | HN request time: 0.854s | source
Show context
twodave ◴[] No.43546683[source]
In the case of F#, the use cases are diminishing with every new C# release, since C# is getting better and better at the things F# is supposed to be strong at (record types, pattern-matching, etc.). Better to write the thing in C# using modern features of the more popular and capable language.
replies(4): >>43546963 #>>43551275 #>>43552521 #>>43556948 #
1. marcosdumay ◴[] No.43546963[source]
You may start to get a point when C# gets a two-directional type inference system. As it's now, any functional-looking code requires so much boiler plate that it's shorter and less bug-prone to copy your functions code everywhere you want to use them.
replies(1): >>43549033 #
2. int_19h ◴[] No.43549033[source]
Can you give an example of said boiler plate?
replies(2): >>43557053 #>>43558166 #
3. DeathArrow ◴[] No.43557053[source]
Using OneOf library or something similar instead of discriminated unions / sum types.

Trying to use a functional pipeline instead of DI.

4. marcosdumay ◴[] No.43558166[source]
Just try to make any generic high order function in C#. Any one you can think of.