I'm going to share with you a wish list of things I'd like to see happen in the rust language edition 2024 and +.
I've been programming for more than 17 years (or much longer, if counting my very early beginnings),
I worked mainly with these languages (I'll only mention the ones I've used a lot):
in this order : Basic > Cobol > QBasic > PureBasic > VB > Fortran > C > C++ > ASM (x32/x86-64) > C# > Javascript > Java > Sql/PLSql > Python > Groovy > Typescript > Go > MQL4/5 > ZIG > Rust
I'm not going to count HTML, CSS/SASS, shell languages, etc...
I'll just write down what comes to mind, and I'll add more ideas to this post whenever I remember a feature.
Each language has its advantages and disadvantages, and what I'd like Rust to do is incorporate some of the strengths of each of these languages :
Basic
- goto ( just kidding )
- nothing really striking here
Cobol
C
- more freedom with Unsafe
- ternary expression (I know there's been a debate on this subject)
- generate a definition file ( like .h) and compile the implementation ( for those who want to share proprietary libraries without disclosing the source code )
C++
- operator overloading
- inheritance (inherited only the fields of the structure, without the implementation)
Java
- enrich Macros to bring them closer to the way Annotations work (ex: annotations in function arguments)
- allow Macros to determine type, rather than acting as a simple text parser
- Wildcards
- Reflection : I know it's difficult for a language without GC, but at least simulate it by adding Metadata as needed.
- the same function name but with different parameters ( I know it's difficult for the static link, but make it possible only for non-external functions.)
- provide the essential features needed to power enterprise frameworks that can compete with Spring/Quarkus, for example.
Go
- compiler speed
- rich standard library
Typescript
- Default function arguments
- Nullish coalescing operator (??) , for Rust it will be Nonish coalescing operator
I'm a great believer in Rust's potential, and I'm sure that by version 2.0, it'll be a must-have language.
I think Rust should not only focus on the needs of system developers, but also offer flexibility to companies developing business applications.
Rust has become my favorite language for starting up projects, even if for professional needs it lacks fluidity, and especially advanced crates (ex: Oracle support for Sqlx, better integration with APM, etc..).
(I know that some concepts are debatable, but the purpose of this post is not to start a debate, but just to share some thoughts.)