Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interesting article. One major problem - it doesn't seem like the OP has ever actually used C for real world code. I say this as someone with a few years of experience with C (and a few years of C++).

None of the examples he showed of C code look like they were actually written by a C programmer. A lot of use of "goto"'s, for one thing. It looks like he tried reimplementing C++ in C.

Actually, that's exactly what he decided must be done: " If the C version wishes to match the C++ version in speed and memory usage, it will have to basically simulate the C++ implementation using a struct and functions which handle objects of that struct type (including things like initialization and destruction)."

So obviously, if you set out from the start with the assumption that to use a language, you have to reimplement another language in it, then of course you'll come to the conclusion that you should just use the other language. But that's not a conclusion that C programmers would be comfortable with.

By the way, as just one nitpick, I'd probably implement that Matrix with "void *" pointers, letting me substitute any struct I want in there later. Just my way of solving the "impossible to solve" problem he presents at the end.



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

Search: