Hacker News new | ask | show | jobs
by echaozh 5556 days ago
Perhaps C++ will finally become a scripting language. So you don't get to complain about the compilation cost.

Seriously, I think it's too much trick to do meta-programming in the language. If meta-programming should be allowed, it should be easier, simpler, and for the ordinary people. Just like Ruby.

1 comments

I agree very much, good comment. I think meta-programming in a language such as C makes a lot of sense, as you want to be able to generate efficient, compiled code, with as little developer effort as possible. Metaprogramming makes it possible to specialize abstract types, data structures, and so on.

But why does the metaprogramming syntax in C have to be so convoluted, bloated and difficult? Do we really need >30 second compile times per file on recent CPUs? If a language is hard to parse both for computers and humans, something went wrong. It should be easy to read for one of both, preferably both.