Comment by CyberDildonics

3 months ago

I think any system language going forward really needs three things:

1. Generics / templates

2. Destructors

3. Ownership

It is unfortunate that this only has the first one. There was a language called clay that had all three and kept easy integration with the C ABI, but it seems like that design has been lost.

Destructors and Ownership implies RAII and all the design and architecture that are assumed with such things. This is far from C semantics, and so out of scope for C3.

Any RAII language will be considered a C++ competitor, not a C alternative. None of Zig, Odin, C3 or Hare has RAII.

  • The problem is that C semantics leads to C problems that the world has dealt with for decades.

    It sounds like you are leaving tried and tested simple advancements in programming on the table just to avoid a superficial comparison.

    Even then what C++ people want from a competitor is simplicity. Not to give up the essentials but to keep the crucial aspects that they can never give up and are the reason they put up with all of the complexity of C++.

    • Personally I think it is reasonable that a C alternative is an alternative to C, and not a C++ alternative. C3 uses a temp allocator that removes a large number of cases where C++ would need RAII to manage memory. Did you try C3?

      8 replies →