Dimensionality of program code

Jeff Nowakowski jeff at dilacero.org
Mon Jan 21 01:47:08 PST 2013


On 01/19/2013 01:01 PM, Stewart Gordon wrote:
>
> But does "plot" mean the curve or the whole diagram?

The whole diagram. I think this should be obvious. The point is the plot 
is defined in 2 dimensions, even if the curve is only 1, and our 
language reflects this.

> The program structure is not defined by this layout. It's defined by the
> curly brackets.

And the curly brackets represent structure, which has some inherent 2D 
properties. That programmers can universally use the 2D representation 
of this structure meaningfully goes beyond just some arbitrary tokens.

> But the whole essence of a picture is that it's two-dimensional. In a D
> program you can escape all line breaks within strings, cut out all
> comments (or turn all // comments into /*..*/ comments), and then remove
> all line breaks that remain, and it will still be essentially the same
> program. You can't do that with a picture.

Sure I can. Just serialize the picture into ones and zeroes, as happens 
all the time on a computer. The computer doesn't care that it's been 
serialized, and can operate on it as is. However, the user cares about 
the 2D visualization, just like the programmer cares about indentation 
and line breaks.

This is my last post on the topic.


More information about the Digitalmars-d mailing list