Re: Dimensionality of program code

2013-01-21 Thread Jeff Nowakowski
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

Re: Dimensionality of program code

2013-01-21 Thread Stewart Gordon
On 21/01/2013 09:47, Jeff Nowakowski wrote: snip 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

Re: Dimensionality of program code

2013-01-21 Thread Jeff Nowakowski
On 01/21/2013 07:03 PM, Stewart Gordon wrote: So in your mind, a 2D image is not a picture, but just a representation of one? And if you cut that image up into 5 rows of 6 blocks, rearrange them into 3 rows of 10 blocks and glue them together, the result is the picture as much as the original

Re: Dimensionality of program code

2013-01-19 Thread Stewart Gordon
On 18/01/2013 23:17, Era Scarecrow wrote: snip For compatibility it does. Functions called without prototypes (even if they are later in the same file) default to return type int too. I can't think of any compilers that make it an error (although they should) I guess the reason they don't is

Re: Dimensionality of program code

2013-01-19 Thread Stewart Gordon
On 18/01/2013 21:50, Jeff Nowakowski wrote: snip I think you dismiss the embedded space too easily. We call a plot laid out in 2D is a 2D-plot. You use both dimensions to specify it. But does plot mean the curve or the whole diagram? snip Even a 2D picture can (and often is) represented as a

Re: Dimensionality of program code

2013-01-19 Thread Era Scarecrow
On Saturday, 19 January 2013 at 17:25:58 UTC, Stewart Gordon wrote: On 18/01/2013 23:17, Era Scarecrow wrote: Maybe, but if you use a newline instead of a semi-colon, then you can't put multiple statements on the same line; A newline as an alternative to a semicolon then. newlines and spaces

Re: Dimensionality of program code

2013-01-18 Thread Stewart Gordon
On 17/01/2013 22:01, Era Scarecrow wrote: snip As I recall for the compilers very early on, all comments and unneeded whitespace were simply removed before compiling, leaving you with one very long command string. The /**/ comment syntax makes perfect sense in this case; Later tools more

Re: Dimensionality of program code

2013-01-18 Thread Jeff Nowakowski
On 01/17/2013 03:13 PM, Stewart Gordon wrote: Mathematically, a curve is considered a one-dimensional object, regardless of whether the space in which it is embedded has two, three or more dimensions. (I'm ignoring fractals here for simplicity.) If you consider the shape of the indented block

Re: Dimensionality of program code

2013-01-18 Thread Era Scarecrow
On Friday, 18 January 2013 at 19:50:06 UTC, Stewart Gordon wrote: On 17/01/2013 22:01, Era Scarecrow wrote: // c example, originally isprime and main don't have // return types, defaulting to int instead. Does the return type of a function still default to int if unspecified in current C,

Dimensionality of program code (was: Exceptional coding style)

2013-01-17 Thread Stewart Gordon
On 17/01/2013 12:30, Jeff Nowakowski wrote: On 01/15/2013 08:29 PM, H. S. Teoh wrote: It's paradoxical that a 1D (i.e. linear) representation is more useful for capturing the complexity of programming as opposed to, say, a 2D graphical representation Typical code is 2d because of

Re: Dimensionality of program code (was: Exceptional coding style)

2013-01-17 Thread Era Scarecrow
On Thursday, 17 January 2013 at 20:17:06 UTC, Stewart Gordon wrote: And in most languages, a program/module is essentially just a sequence of tokens, and as such is one-dimensional. We might look at it in a two-dimensional form, but this two-dimensional layout means nothing as far as the

Re: Dimensionality of program code (was: Exceptional coding style)

2013-01-17 Thread Rob T
On Thursday, 17 January 2013 at 20:17:06 UTC, Stewart Gordon wrote: OTOH, because we tend to view code in a two-dimensional form, and even rely on line breaks and block indentation to make code readable, I can understand people thinking of code as 2D. And there are languages in which the code

Re: Dimensionality of program code (was: Exceptional coding style)

2013-01-17 Thread H. S. Teoh
On Thu, Jan 17, 2013 at 11:43:33PM +0100, Rob T wrote: On Thursday, 17 January 2013 at 20:17:06 UTC, Stewart Gordon wrote: OTOH, because we tend to view code in a two-dimensional form, and even rely on line breaks and block indentation to make code readable, I can understand people thinking of

Re: Dimensionality of program code (was: Exceptional coding style)

2013-01-17 Thread Era Scarecrow
On Thursday, 17 January 2013 at 23:35:37 UTC, H. S. Teoh wrote: It's easy to represent in 2D or 3D a *simulation* of program execution (I.e., a particular instance of execution), but how do you represent concurrent program *logic*? For example, consider this: you have a program in which up