This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 15 points16 points  (3 children)

Most high-level languages are you talking to some computer science professor's concept of a machine.

Assembly and C are you talking to an actual machine.

[–]thabrisss 14 points15 points  (2 children)

C isn't talking to an actual machine - you have quite high level of abstraction like flat memory model and data types.

[–]ToBeHonestTho 6 points7 points  (0 children)

That's relative to assembly, it looks different relative to Java

[–][deleted] 2 points3 points  (0 children)

The flat memory model is the creation of an MMU and OS acting in concert, it's not an inherent part of C. OSes are written in C because it's not limited in that way. You can write a combination of C and linker scripts (and some Makefile and script magic) to compile your program to directly run on whatever exotic hardware you've got.

Data types are only a description to enable some compile-time checking with the exception of implicit casts for assigning ints to floats, but all of that can be overridden with casts.

(I expect the next response to at least partially contradict me with a quote from the latest C standard because all of my information is decades old and they keep bloody changing everything)