Has the need to use functional programming languages become obvious yet? Has C/C++ et al. fallen by the wayside, yet?
Has the need to use functional programming languages become obvious yet? Has C/C++ et al. fallen by the wayside, yet?
Most new languages I can think of have a concept of immutability and sum types. (Kotlin, Swift, Rust)
Many languages are in fact converging on what seems like a local optimum, with a blend of functional and non-functional idioms.
The line has become a lot blurrier, which makes the question hard to answer.
Lambda's: great! But real null-safety, strong type safety, proper sum types, pattern matching/ type destructuring, are now my requirements.
I'd say Kotlin is the language with the most adoption that ticks the boxes. And it is (not surprisingly) an OO lang.
How? Kotlin is decisively an object oriented language.
You can also check out C# since it fits your requirements. It has pattern matching, but sum types are still in the works.
https://www.reddit.com/r/csharp/comments/7b8mvn/have_sum_typ...
As much as a generation of Java programmers (like myself) grew up thinking that C++ was old hat and Java was its natural successor, C++ has been quietly ahead of Java with regard to lambdas, generics, type-level trickery. Not to mention performance and backward-compatibility [1].
But reading C++ makes my eyes bleed. I much prefer FP for business logic and web-app development. Haskell is fast but it's no C++, and that's OK. I wouldn't want Haskell to take C/C++ market-share. I want it to compete against other languages that don't give me performance, safety or terseness.
[1] C++17 on the Commodore 64: https://www.youtube.com/watch?v=zBkNBP00wJE
Also, I seriously hope they won't. The whole point of C in this day and age is extreme simplicity and portability. The latest standard, C17, has only corrections. C11 has really all that's needed for "modern" applications, aka a threading library which is not pthreads and decent unicode support.