3 ms·
You can use _Pragma/#pragma, regardless though, you can achieve a lot of what lifetimes can without any annotation.
by dependenttypes 6y ago
You can use _Pragma/#pragma, regardless though, you can achieve a lot of what lifetimes can without any annotation.
- SAI_Peregrinus 6y agoPragmas are extensions to C, not part of the C language standard. You can add things to C, but it then ceases to be standard C and becomes GNU C or MS Visual C or early C++ or something else. But not ISO Standard C. And yes, just about anything non-lexical lifetimes can do you can do with static analysis. But the set of things you can do with Rust includes things that need explicit lifetime annotations, which C doesn't have.