Live data from Hacker News

Switching to C over 'Modern' Programming Languages

devtails.xyz

1–10 of 170 posts

Re: Switching to C over 'Modern' Programming Languages

#4

Other than assembly language, all languages embody abstractions. I find understanding certain abstractions hard going because they don't mesh well with my view of the problem domain and my design for solution's implementation.

Yep.

You think C is "low level", but it was once considered "high level", and the compiler does many things you don't want, and the standard's ambiguously-worded, and implementers have their own interpretations about the ambiguity, and also bugs in their compilers, and you eventually arrive at:

"If you really want those instructions to happen in this function, without fear of magic, write them in assembly."

Re: Switching to C over 'Modern' Programming Languages

#5
> After looking up compatibility for SDL, I noticed it is able to run on iOS 6 and greater, meaning it supports iOS devices all the way back to iPhone 3GS.

Whoah, I was convinced there is no way to write and run apps on these older iPhones - I wonder how difficult the whole process is.

Re: Switching to C over 'Modern' Programming Languages

#6

Other than assembly language, all languages embody abstractions. I find understanding certain abstractions hard going because they don't mesh well with my view of the problem domain and my design for solution's implementation.

This is silly. Assembly is an abstraction too. Do you think the CPU actually runs the code you give it? Of course not. There's microcode, register aliasing, speculative execution, etc.

Even assembly itself has symbols and labels, which are themselves abstractions.

Re: Switching to C over 'Modern' Programming Languages

#7

Other than assembly language, all languages embody abstractions. I find understanding certain abstractions hard going because they don't mesh well with my view of the problem domain and my design for solution's implementation.

Yep. You think C is "low level", but it was once considered "high level", and the compiler does many things you don't want, and the standard's ambiguously-worded, and implementers have their own interpretations about the ambiguity, and also bugs in their compilers, and you eventually arrive at: "If you really want those instructions to happen in this function, without fear of magic, write them in assembly."

Then you realize that your CPU has hardware bugs, and you go design and manufacture your own CPU :).

Re: Switching to C over 'Modern' Programming Languages

#8

Other than assembly language, all languages embody abstractions. I find understanding certain abstractions hard going because they don't mesh well with my view of the problem domain and my design for solution's implementation.

Actually, x86 assembly also embodies plenty of abstractions. Not sure on ARM or RISC-V, but x86 assembly instructions are not executed the way you'd think by any modern processor.

Essentially the processor reads a while bunch of instructions at once, splits each in the raw microinstructions, arranges them in a graph of dependencies, and then solves an optimization problem to find the best way to schedule nodes from that graph onto its internal execution pipelines. In real-world execution, you can't even tell what assembly instruction(s ) are the ones being executed at a partocular time - disparate parts of various instructions. Some instructions, like "mov ax, 0", don't even execute: they just serve to mark which the tens of real registers is now free to use for another symbolic register like bx.

Re: Switching to C over 'Modern' Programming Languages

#9
Don’t expect to see immediate benefit from Rust by writing a small Pong application. Rust gives you confidence at scale: the ability to depend on many 3rd party blocks without compromising stability or performance, the ability to grow and maintain the code, collaborate on it, etc. Nothing of this is easily seen on a small self-contained program you can write in C.

Re: Switching to C over 'Modern' Programming Languages

#10

> After looking up compatibility for SDL, I noticed it is able to run on iOS 6 and greater, meaning it supports iOS devices all the way back to iPhone 3GS. Whoah, I was convinced there is no way to write and run apps on these older iPhones - I wonder how difficult the whole process is.

Whoever has downvoted this, can you explain why? I'm interested in this angle, and it quotes the article so therefore is on-topic.

Can't find current info on it online.

Post reply on HN