TrapC: A Safer C Extension

2025-03-03
TrapC: A Safer C Extension

TrapC is a new extension of the C programming language designed to enhance memory safety. Removing keywords like `goto` and `union`, and adding `trap` and `alias`, TrapC incorporates C++ features such as constructors and destructors. It boasts automatic memory management, preventing leaks, and uses lifetime management for pointers instead of garbage collection. Despite its minimalist design—maintaining the same keyword count as C—it surprisingly offers significant C++ code compatibility. Presented at an ISO C meeting, TrapC aims to address memory safety concerns more comprehensively than other existing proposals.

Development Language Extension