What I'd really like to see in an if-statement...

Karl Heuer karl at haddock.ima.isc.com
Tue Aug 8 11:46:23 AEST 1989


In article <14521 at bfmny0.UUCP> tneff at bfmny0.UUCP (Tom Neff) writes:
>It would be fun to have such a thing, it would make expressing lots of
>conditions more concise and everyone would use it.  However it would
>break a lot of things in "C" (the expression above IS VALID C right now,
>for instance, with a totally different meaning) and parsing would be a
>nightmare.  I wouldn't hold my breath.

It would "break a lot of things in C"?  I admit that "x<y<z" is currently
valid C, but I seriously doubt that it gets used heavily!  (Outside the
Obfuscated C Contest, anyway.)  And I doubt that the parse is any more
difficult than the dangling-else problem.

But still, it would be a new wart in a language that already has too many.  If
it could be defined in such a way that the language became *simpler*, I'd like
it a lot more.  (The ICON semantics come to mind.)

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list