3 ms·
It would be interesting to understand better where language feature are actually needed or helpful, and where the code should be organized differently. I also
by uecker 1y ago
It would be interesting to understand better where language feature are actually needed or helpful, and where the code should be organized differently. I also observe that often cure if worse than the disease.
Many example I see where people argue for metaprogramming features are not all convincing to me. For example, there was recently a discussion about Zig comp-time.
https://news.ycombinator.com/item?id=44208060 https://news.ycombinator.com/item?id=44208060
This is the Zig example: https://godbolt.org/z/1dacacfzc https://godbolt.org/z/1dacacfzc
Here is the C code: https://godbolt.org/z/Wxo4vaohb https://godbolt.org/z/Wxo4vaohb
Or there was a recent example where someone wanted to give an example for C++ coroutines and showed pre-order tree traversal (which I can't find at the moment), but the C code using vec(node) IMHO was better:
https://godbolt.org/z/sjbT453dM https://godbolt.org/z/sjbT453dM compared to the C++ coroutine version: https://godbolt.org/z/fnGzszf3j https://godbolt.org/z/fnGzszf3j (from https://news.ycombinator.com/item?id=43831628 https://news.ycombinator.com/item?id=43831628 here). Edited to add source.