Hacker News new | past | comments | ask | show | jobs | submit login

> Hasn't this been debunked multiple times already?

No. One of the main problems with the C user base is that there's a sizable number of developers who attach some sort of special status to C as the closest thing to assembly language and get incredibly belligerent with compilers when they fail to reproduce the exact assembly they were expecting. (Cryptographers angry that the compiler is getting rid of their constant-time tricks is one of the more notable cases, no matter how many times compiler vendors keep saying "stop using C if you want constant time, we don't guarantee it, we won't guarantee it").

> What are you comparing it to?

The reality is that C isn't meaningfully closer to assembly language than just about any other non-runtime based language--things like Fortran, Pascal, Rust, Zig, etc. are all around as good as C at representing machine hardware. Honestly, I'd say Rust is marginally better than C, by virtue of the fact that it allows multiple return types and lacks some of the implicit conversion inanities of C.

> Uh, okay, then what is?

The closest notable language you'll probably find is... LLVM IR (although I'd caveat that with LLVM IR isn't meant to actually be written by hand). LLVM does hew too close to the C abstract machine to be truly effective in this role, but it does make the crucial first step of having a distinction between registers and memory that is absent in all of the regular programming languages I'm aware of.




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

Search: