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

He certainly hasn't accepted D as a language for core Linux work, despite the benefits without any supposed performance tradeoffs. And he uses GCC for compilation, despite the existence of specialized compilers that offer better runtime performance.


Would Linus accept a C compiler that replaced malloc/free with a GC? It's only 1%.


No, but not because of performance. Malloc/free is required for deterministic runtime behavior. A GC would take that away.

Would Linus accept a language that is more than 1% slower than optimal? Yes, he already does. It's called C. C is slower than optimal assembly.

He chose C because it is easier to write large systems in a higher level language, and it is far easier to write cross platform code in.


That is a common mistake, malloc()/free() aren't deterministic, specially in threaded code, heaviliy loaded system, ISO C doesn't even provide guarantees of how deterministic they should come back to the caller across C implementations.


Sure but you control when you call them.


If you call them explicitly, you control the call.

There is no control over the duration, or what third party code is doing with them.


In D you also control when to call the GC.




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

Search: