Since we're talking about the future of programming, can someone sell me on Swift instead of ocaml, SML, or F#?
I don't see a good reason to pick it outside of targeting Apple devices.
Since we're talking about the future of programming, can someone sell me on Swift instead of ocaml, SML, or F#?
I don't see a good reason to pick it outside of targeting Apple devices.
I don't think the industry is likely to adopt functional languages. What people in the industry seem to want are safer programs with better null handling (e.g. optionals), friendly handling of async programming (e.g. futures/promises/async await), map/filter/reduce, immutable data types, and similar features that make programs safer and easier to write. Yet, the industry does not want to give up the object-oriented paradigm or the ability to do non-functional-programming stuff.
I think the future of programming languages is going to be hybrid languages rather than functional languages, simply because they are easier to adopt. In some cases, existing languages are absorbing those new features, so many companies are benefitting from them without switching languages.
Of the alternatives you mentioned, F# is the closest to being a hybrid language because of its integration with the .NET platform. Similar languages include Scala, JavaScript, Java since Java 8, Swift, Kotlin, etc. Python now has some of this stuff too.
On the other hand, Go is notable for rejecting functional features and it is also growing in popularity.
Outside of Apple platforms it is pretty much WIP.
+ scala, go, rust, elixir/erlang
Yeah its so much time to learn all this stuff. Its a good reason they probably will all fade, better stick to js/python/java/C#/C++ like everyone else and wait.
I would change Java to Kotlin here, since Kotlin has a 1:1 interop with Java while having goodies like null safety, type inference and functional programming without the academicism of Scala (and its slow compilation time).
If you also account for the smooth learning, Kotlin is probably the safest bet from these 9 mentioned.
A lot of businesses with Java codebases are already messing with it (and not only for Android).
As much as I like OCaml, for example, I don't see it being mass-adopted in the near future, nor its tooling reaching the state of more established languages. All those languages you mentioned are most likely to continue being just niche ones.
The only mostly-functional language I can see being mass-adopted right now is Elixir, and it still has a long way to go.