Remix.run Logo
▲ mathisfun123 6 hours ago

the question is about whether you understand in the slightest the output of the tool. does the determinism of the compiler somehow imbue you with a better understanding of the assembly it generates?

▲sedan_baklazhan 5 hours ago | parent [-]

Yes. If you understand C code well, you have a very good understanding of what will actually happen when the binary is executed.

▲mathisfun123 5 hours ago | parent | next [-]

This is a myth https://queue.acm.org/doi/10.1145/3212477.3212479

▲sedan_baklazhan 5 hours ago | parent [-]

I did not say that C is a low level language. You must have a very weak understanding on this topic.

▲mathisfun123 5 hours ago | parent [-]

> You must have a very weak understanding on this topic

i work on the codegen for a C compiler i'm pretty sure my understanding is better than yours <shrug>

EDIT: and also you've clearly never read that article

> One of the key attributes of a low-level language is that programmers can easily understand how the language’s abstract machine maps to the underlying physical machine

so you did exactly imply "C is a low level language"

▲bitwize 5 hours ago | parent | prev [-]

lol nobody "understands C code well"

The idea that C is a smol language that can be completely understood by one person is one of those myths that need to be put to bed. C is riddled with complexities and footguns, especially but not exclusively around undefined behavior.

▲sedan_baklazhan 5 hours ago | parent | next [-]

Undefined behavior is something that you will avoid - of course, only if you know the language pretty well.

▲senderista 3 hours ago | parent [-]

UB is basically impossible to avoid in practice--that is why the Linux kernel forced GCC to add a bunch of flags to "do what I mean", making UB defined in those cases.

▲skydhash 4 hours ago | parent | prev [-]

> The idea that C is a smol language that can be completely understood by one person is one of those myths that need to be put to bed

You don’t need to understand the language completely. You only need to understand the general semantics and refer to the standard and docs to get the semantics down. That’s what they’re here for.