logoalt Hacker News

pjmlptoday at 9:37 AM3 repliesview on HN

Because contrary to urban myths, C is a normal high level language like everything else.

The Assembly like abilities have been growing as language extensions in specific compilers, not as part of ISO C.

Going back to K&R C, inline Assembly or intrisics were not even available, all of that required using the Assembler directly.


Replies

bigfishrunningtoday at 12:24 PM

I would argue that inline assembly, while not in the standard, is really just a convenience feature -- it is part of the standard to declare an extern reference to a function in the symbol table and jump to it, it just requires a separate ASM object to link alongside your C object. Inline assembly doesn't allow anything you can't do without it.

show 1 reply
ueckertoday at 9:43 AM

Not every high-level language gives you byte-level access to the representation of memory objects.

But it is also wrong to reduce a language to what is in the spec.

show 2 replies
titzertoday at 11:28 AM

It's not normal in any other language that constant-folding in the compiler has different behavior than running an expression on the machine.

C exists in a nether world of being neither assembly nor high-level language.

People only call it high level because in the 1970s, having blocks, loops, and functions was high level, compared to the SoTa machines available in the day, which were either programmed with assembler or some bespoke thing the manufacturer came up with.

show 2 replies