C2y Proposal: Essential Effects for C
The proposal "Essential Effects for C" by Alex Celeste aims to enhance C with a type and effect system for better side effect management, categorizing effects into Local, Persistent, and Control groups.
Read original articleThe proposal titled "Essential Effects for C" by Alex Celeste suggests enhancing the C programming language by integrating a type and effect system. This system would require functions and blocks to declare the classes of effects resulting from their evaluation, thereby improving composability in metaprogramming and facilitating the definition of MISRA-style restrictions. The proposal outlines a formalized effect system that tracks side effects at a granular level, combining it with the type system to ensure that specific effects occur or do not occur in designated contexts. The proposed system categorizes effects into three groups: Local, Persistent, and Control, with a focus on static effect tracking rather than dynamic handling. The document details how effects propagate within scopes and how they can be combined, emphasizing that effects are distinct from types. The proposal also raises questions about additional useful effect classes and the potential for a notation system for effect annotations. Overall, the proposal aims to enhance the safety and reliability of C programs by providing a structured way to manage side effects.
- The proposal aims to integrate a type and effect system into C for better effect tracking.
- It categorizes effects into Local, Persistent, and Control groups.
- The system focuses on static effect tracking without dynamic handling.
- It emphasizes the distinction between effects and types in programming constructs.
- The proposal invites feedback on additional effect classes and notation systems.
Related
Reflection for C++26
The P2996R4 document proposes a reduced set of static reflection features in C++26, using constant expressions, a reflection operator, metafunctions, and splicers. Implementation progress is ongoing by Lock3 and EDG.
Evolving languages faster with type tailoring
A proposed solution called "type tailoring" enhances type systems using metaprogramming, allowing better type inference for constructs like regex. The approach aims to improve programming language usability and efficiency.
C Isn't a Programming Language Anymore (2022)
The article examines the shift in perception of C from a programming language to a protocol, highlighting challenges it poses for interoperability with modern languages like Rust and Swift.
Improving _Generic in C2y
The C programming community is enhancing the _Generic feature for the C2y standard to resolve issues from C23, focusing on simplifying type matching and addressing limitations in usability and behavior.
Typing Lists and Tuples in Elixir
Elixir's new type system introduces sound gradual typing to prevent runtime errors, enhancing list and tuple handling while requiring developers to prove type adherence, potentially increasing boilerplate code.
I hate it but whatever - my love for C ended sharply after C99 fno-strict-aliasing anyway.
Related
Reflection for C++26
The P2996R4 document proposes a reduced set of static reflection features in C++26, using constant expressions, a reflection operator, metafunctions, and splicers. Implementation progress is ongoing by Lock3 and EDG.
Evolving languages faster with type tailoring
A proposed solution called "type tailoring" enhances type systems using metaprogramming, allowing better type inference for constructs like regex. The approach aims to improve programming language usability and efficiency.
C Isn't a Programming Language Anymore (2022)
The article examines the shift in perception of C from a programming language to a protocol, highlighting challenges it poses for interoperability with modern languages like Rust and Swift.
Improving _Generic in C2y
The C programming community is enhancing the _Generic feature for the C2y standard to resolve issues from C23, focusing on simplifying type matching and addressing limitations in usability and behavior.
Typing Lists and Tuples in Elixir
Elixir's new type system introduces sound gradual typing to prevent runtime errors, enhancing list and tuple handling while requiring developers to prove type adherence, potentially increasing boilerplate code.