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

2

u/[deleted] Feb 29 '24

Exceptions always felt to me like the old "goto" from C64 Basic. And goto is known as bad syntax. Not as bad as Null, but in the same direction.

Yepp. You are basically right with this intuition. For invalid-input kind of errors.

But sometimes exceptions are necessary. For operational errors, like out-of-memory, division-by-0, .... But even for those: the language do not have to have a feature dedicated for this specifically. Only some functions are needed, that look normal for the coder but are special for the compiler.