Three Years of Abstractionless C
18 hours ago
- #C Programming
- #Language Design
- #Systems Programming
- The author chose to work in C after using Go because C was more straightforward for systems programming needs.
- C and C++ are described as 'IKEA or LEGO languages' for creating other languages, with standard libraries being mixed and often not used as-is.
- Abstractionless C was developed to provide generics, STL-like containers, serialization, and slices while avoiding C++'s complex abstractions and pointer issues.
- The design emphasizes simple slices (u8s), arena-based memory management, and modular structure to reduce malloc usage and improve productivity.
- The project uses a custom unstandard library with slice-based APIs and avoids dependency management by relying on system package managers like RPM or APT.
- It worked well for a 100KLoC project, aligning with the idea that standards can be adapted or rewritten as needed.