maxsam
Re:Better C – A subset of D Programming Language
on Wednesday April 29, 2020 @06:10AM (#23017437)
> 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