r/functionalprogramming • • Feb 29 '24

Question Are "mainstream" languages dead?

I want to know what new languages are currently developed in the last few years, that have the potential to become at least some importance.

Because all new languages from the last years I know of have lots of things in common:

  1. No "Null"
  2. No OOP (or at least just a tiny subset)
  3. Immutability by default
  4. Discriminated Unions (or similar concept)
  5. Statically typed
  6. Type inference
  7. No exceptions for error handling

All newer languages I know have at least a subset of these properties like:

Rust Gleam Roc Nim Zig

Just to name a few I have in mind

In my opinion programming languages, both mainstream and new, are moving more and more towards more declarative/functional style. Even mainstream languages like C++, C# or Java add more and more functional features (but it's ugly and not really useful). Do traditional languages have any future?

In my opinion: no. Even Rust is just an intermediate step to functional first languages.

Are there any new (serious) languages that don't follow this trend?

65 Upvotes

105 comments sorted by

View all comments

Show parent comment

5

u/BeautifulSynch Mar 01 '24 edited Mar 01 '24

How about "helicalists"? The history of programming languages (and software in general) definitely keeps cycling between regions of possibility-space, but each cycle tends to improve the feature availability and flexibility within each of those region, leading to an overall-superior software landscape given enough time.

Take goto for example; we once had the power to move execution arbitrarily through a program, but that caused way too many thorny errors.

Then we made closures to contain behavior and block execution from traveling through them except in specific ways.

Then we got stuck when expressing unexpected behavior and made conditions/exceptions.

Then we stopped liking how exceptions move through code unpredictably and made Optionals.

Then we have systems like React moving towards continuations, which are essentially controlled gotos.

Each cycle sacrifices the benefits of the last step for filling up it's weaknesses, until you've gone all the way back to using the old idea to escape the costs of your mitigations; but once you've looped all the way around, you end up with a superior version of your initial approach.

Of course, if you're in the middle of a cycle (like our current cycle from the interactivity of CL/Smalltalk (which itself emerged as a response to assembly/Fortran and the like being meticulous and brittle) towards text-oriented languages such as Java/Haskell/Python), it's quite likely that many/most things relevant to that particular cycle will be worse than the original systems for the sake of maximally improving on it's weaknesses, since the mid-cycle world is made by people who hated the old way desperately enough to invest their effort into replacing it.

But eventually the flaws of the current approach will push people away once more, and either the wheel will turn back again in a superior form, or a new approach will be found that at-least-mostly mitigates the current one's flaws.