r/functionalprogramming • u/Voxelman • 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:
- No "Null"
- No OOP (or at least just a tiny subset)
- Immutability by default
- Discriminated Unions (or similar concept)
- Statically typed
- Type inference
- 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?
View all comments
Show parent comment
3
u/letsfuckinggobears Feb 29 '24
I think the guy means that you can have a type that is type Foo or type null, as in you can return a null or a Foo, in which case it is not functionally different from an Optional/Option/etc type: Some(value) or None
If you have a function that returns just the type Foo, you cannot return null (since null is not of type Foo!) . It is possible to build a type system as such.