top | item 5598638

(no title)

denniskubes | 13 years ago

> Yes I am being simplistic and yes certain data types have certain syntactic sugar but I have found this to be a good mental model

As stated in the post.

discuss

order

mturmon|13 years ago

I think you're going to keep getting comments on these ill-considered asides, but here is another problem:

"In most assembly languages, data types don’t exist. You operate on bytes and offsets."

This is just not true.

Most assembly languages (I learned on PDP-11 assembler, which I remember best, but what I say is true of 68000 and x86 too) have a notion of a byte, but also integers of various word lengths, and floating point numbers.

In fact, some registers are in effect designated as "pointers" for various kinds of conventional indirect addressing (the instruction pointer, the register holding the stack pointer, and others).

In this sense, C is even closer to assembly than you indicate, because the data types are so analogous.

asveikau|13 years ago

This reminds me of another comment I had: I personally find the phrase "syntactic sugar" irritating. As used, I don't feel like it adds anything to the blog post. IMO you could write nothing there and it'd make the exact same point.

What exactly is the "syntactic sugar" that hides the idea that names can have addresses? Structs? Some specific kind of expression? Array index syntax? The names themselves?

halayli|13 years ago

Simplicity here doesn't help. Variables aren't about how they are stored and where but more about what gets applied to them and how.