One can also use D (now part of GCC).
D with its better dialect allows one to not use D run time libraries, or even C++ runtime libraries. A developer can just choose what C libraries they want to link with.
In this mode, no GC is provided, so a developer will be using manual allocation.
With upcoming D's dip1000 feature, it will be able to do rust-like borrows checker at compile time (or at least this is my understanding). And that capability will be available in betterC mode as well (not just for full blown D).
The code in betterC can use generics and other advanced features
In this mode, no GC is provided, so a developer will be using manual allocation.
With upcoming D's dip1000 feature, it will be able to do rust-like borrows checker at compile time (or at least this is my understanding). And that capability will be available in betterC mode as well (not just for full blown D).
The code in betterC can use generics and other advanced features
https://dlang.org/spec/betterc.html
---
Nearly the full language remains available. Highlights include:
- Unrestricted use of compile-time features
- Full metaprogramming facilities
- Nested functions, nested structs, delegates and lambdas
- Member functions, constructors, destructors, operating overloading, etc.
- The full module system
- Array slicing, and array bounds checking
- RAII (yes, it can work without exceptions) scope(exit)
- Memory safety protections
- Interfacing with C++
- COM classes and C++ classes
- assert failures are directed to the C runtime library
- switch with strings
- final switch
- unittest
dip1000:
https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1000...