Hacker News new | past | comments | ask | show | jobs | submit login

> part of the beauty of C is it's simplicity.

True, but the trouble with simplicity is a number of things become excessively tedious and error-prone to code - such as ensuring no buffer overflows.

C makes up for its lack of expressivity by adding a text preprocessor. The preprocessor is a tacit admission that the core language simply isn't powerful enough. When people find themselves doing metaprogramming with the C preprocessor, it's really time to graduate to a more powerful language. DasBetterC doesn't need a preprocessor, and its metaprogramming facilities far outstrip the C preprocessor.




> its metaprogramming facilities far outstrip the C preprocessor.

...and are severely crippled by applying betterC constraints to CTFE:

  // CTFE-only
  string genint(string name) {
      return "int " ~ name ~ ";";
  }

  void main() {
      mixin(genint("x"));
  }
Error: array concatenation of expression "int " ~ name ~ ";" requires the GC which is not available with -betterC




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: