Hacker News new | ask | show | jobs
by rightbyte 1637 days ago
Ye I feel the author has no clue what he is talking about.

"I can appreciate the “macho factor” of being able to write fast software in C or C++ (or even Objective-C), but most people aren’t going to be able to do that"

I mean, C is probably the simplest tool to write fast software with, since there are so few hidden costs to know about. Like strdup does a malloc. What else?

In C++ you have to know implementation details of the standard lib and calling conventions to write fast code. Java, C# and Go the same but abit more.

For e.g. Haskell and Julia you need to know quite much to reason about what code will be generated and good luck doing that with complex code.

1 comments

> I mean, C is probably the simplest tool to write fast software with

The simplicity is the hard part. Fishing for compliments by "pretending" it's so trivial to you shows immaturity.

The author definitely knows what he's talking about. Perhaps it's you who's doesn't?

I did not mean it is 'simple' to write fast C code, but that it is 'simpler'.

Simpler in the amount of knowledge you need to have to write the fast program.

I mean just compare "C the programming language" with Stroustrup's "C++ the programming language". It took me years to understand even a fundamental thing as move semantics. When programming fast C++ you need to be able to see what is moved properly and optimized in the way you want. How classes are inlined into the code etc. What container do malloc on construction, what containers are cheap empty, and so on and on.

There is no such knowledge needed for C.