Better C – A subset of D Programming Language
a year ago
- #programming
- #D language
- #BetterC
- BetterC is a subset of D that doesn't depend on the D runtime library, only the C runtime library.
- Linking D functions into C programs is complex, but BetterC simplifies this by requiring only the C runtime.
- BetterC is useful for constrained environments or embedding D libraries in larger projects without D runtime initialization.
- Key features retained in BetterC include metaprogramming, RAII, memory safety, and interfacing with C++.
- Unavailable features in BetterC include garbage collection, exceptions, dynamic arrays, and built-in threading.
- Unittests can be run in BetterC mode, but assertions use the C runtime library instead of D's.