3 ms·
As is often the case in CS, there are no definitions for plenty of concepts. FP is simply “programming with functions”. Most languages are multi-paradigm, and
by kaba0 4y ago
As is often the case in CS, there are no definitions for plenty of concepts. FP is simply “programming with functions”. Most languages are multi-paradigm, and in my book any language that has lambdas is already functional - but it is a spectrum. Java has ways to express functional programs, but it is of course much less functional than, Haskell - which itself is also not 100% pure FP.
- CharlieDigital 4y agoIf every language can be functional, than no languages are functional. Would you agree that C# is not functional? If you agree that C# is not functional, than F# is also not functional. Nearly every construct that can be expressed in F# can be expressed in C#.
- kaba0 4y agoNo, C# has plenty of features making functional programming possible, so it is definitely on the spectrum of FP languages. Let’s go at it from the other direction - is Haskell functional? Because it has unsafe pointer access and unsafe IO, so it can pretty much express every C# program as well, right?