I like the style of Functional programming, and I tend to use it where appropiate in non-Functional languages, which have varying levels of support for the style. In Java, I can define immutable data structures, and declare immutable variables within my methods. In C# I can also define immutable data structures but I can only declare mutable variables and just not assign them after initialization. In neither language can a data structure be marked as immutable (I can just define its fields to not allow assignment after initialization, and to use types I know are immutable), nor can methods be marked as “pure”. Javascript doesn’t even support tail recursion, which can make Functional style recursion have much worse performance than procedural style looping. (With good compiler optimizations on both styles, they perform the same.) I would like to see greater support within these languages for Functional programming.
I like the style of Functional programming, and I tend to use it where appropiate in non-Functional languages, which have varying levels of support for the style. In Java, I can define immutable data structures, and declare immutable variables within my methods. In C# I can also define immutable data structures but I can only declare mutable variables and just not assign them after initialization. In neither language can a data structure be marked as immutable (I can just define its fields to not allow assignment after initialization, and to use types I know are immutable), nor can methods be marked as “pure”. Javascript doesn’t even support tail recursion, which can make Functional style recursion have much worse performance than procedural style looping. (With good compiler optimizations on both styles, they perform the same.) I would like to see greater support within these languages for Functional programming.