Andrew Lentvorski <[EMAIL PROTECTED]> writes:

> C programs can be smashed onto one line (most of the time) with
> almost no change in semantics or tokenizing.  C isn't insensitive to
> it (as I showed ... "a = *x/*y;" is another nice one), but normally
> it is the case.  Tokens parse the same; separators stay the same;
> the meaning stays the same.

That was not what we were discussing. You're talking about lines and
vertical separation. The example was complaining that expressions like
"+", "++" (prefix), and "++" (postfix) were confusing because they
"mean something different" depending on how one sprinkles spaces among
their concatenation. One can make the same complaint about
identifiers:

  int i = 0;
  inti  = 0;

One cannot "smash" these expressions together and have them mean the
same thing. Both are valid statements, the second depending
semantically on some variable "inti" having been declared previously.

One can put as much or as little whitespace before the first "i", and
between the second "i", the "=", the "0", and before and after the
semicolon. But that space -- distinguishing between zero and non-zero
amounts -- between "int" and "i" is important, because space is one
way to terminate an identifier, one among a family of punctuation.

Allowing space to be used to terminate an identifier does not make a
language "whitespace-sensitive". I interpret that kind of sensitivity
to mean that the program's (or sentence's) meaning changes depending
on how much space /above the minimum/ is used. That is, if "int i" and
"int  i" were different because the latter contains one more
intervening space, I'd call that being whitespace-sensitive. But
differentiating between "inti" and "int i" is not sensitive as such,
as that intervening space is the minimum punctuation required to
indicate a boundary between two identifiers.

-- 
Steven E. Harris


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to