3 ms·
Since D is already taken, maybe a language called "E"? The first thing I'd borrow from Rust are Option and Result for better error handling.
by jll29 3y ago
Since D is already taken, maybe a language called "E"?
The first thing I'd borrow from Rust are Option and Result for better error handling.
- keyle 3y agoYes, this, most modern languages embrace this idea of Optional. I believe OCaml might have invented it (I love OCaml too!). Odin has it I think, Rust obviously, and Swift heavily as well. What's interesting, modern C, is promoting this move as well. Don't just return an integer, return a struct result_t with a fail bool or error bool in it, as opposed to some const char* pointing to null. Do this more and more and your C code starts becoming a lot more digestible and modern (although common sense still applies to not go overboard with these constructs in C, but you can set up a nice contract type API design within your code base).