3 ms·
I think several interesting points were brought up in this thread regarding the assumption of functional aspects presented in F# by C#. LINQ being the most popu
by bob1029 7y ago
I think several interesting points were brought up in this thread regarding the assumption of functional aspects presented in F# by C#. LINQ being the most popular example. I am currently lead to believe that a purely functional application development domain is potentially an overreach of theory in terms of building things that can interact with the real world in very complex and 'functionally-leaky' ways.
My biased perspective as someone who hasn't really used F# very much is this: Perhaps an imperative language such as C# 8.0, with a few high-value functional features sprinkled in, is actually the best of both worlds when viewed through the lens of someone who has to interface with really weird business systems. I use imperative techniques for handling remote calls, exception handling, etc. Then, when I need to work with my internal business logic or models, I can use more functional techniques.
Based on my own understanding and other comments presented here, C# does not seem to preclude the usage of functional approaches to solving problems if you have the discipline and experience to do so. C# also brings with it a host of other benefits in terms of tooling support and simply being able to find other developers who can understand your codebase.
- McWobbleston 7y agoI really encourage you to use F#, as someone who's done C# for a long time I find F# (while not perfect) does strike near to that ideal balance of FP / imperative you speak of. Writing functional code naturally is a breeze, while the language isn't going to punish you or feel awkward if you need to drop in some mutable state or OO programming
- tigershark 7y agoOn the contrary, you have a huge advantage to interface with the dirty world using F# thanks to exhaustive pattern matching and you can make everything type safe to render invalid state unrepresentable.