r/functionalprogramming • • May 01 '23

Question Learning functional oncepts - Which Language?

Hello everyone. I'm planning to dabble in functional programming to learn the concepts not because I think we will ever use it at work (I don't) but to broaden my horizon & try to utilize some functional concepts in non functional languages like C# & Javascript. I'm primarily a C#/Javascript/Typescript/Vue developer. On the .Net side there is of course F# but as i'm sure most of you know F# is not a pure functional language. Would it be better to go with a purge functional language when i'm trying to learn like Haskell to really drive functional concepts home or will F# be fine & I probably should stick with that since i'm already on the .Net side?

14 Upvotes

34 comments sorted by

View all comments

Show parent comment

3

u/c4augustus May 02 '23

Since .NET is already your ecosystem, F# is already there. Although it allows impure functions and even some OO, you don't have to code that way. Idiomatic F# is quite FP. Purity can be a matter of discipline, especially when using language that will not force or even encourage it. Case in point, I code in an FP style using Kotlin and Swift for mobile, and for clarity subdivide source directories into 2 subdirectories: pure/ side/, trying to code as much as possible under pure/.