C pet peeve - (nf)

utzoo!decvax!duke!mcnc!unc!tim utzoo!decvax!duke!mcnc!unc!tim
Thu Mar 24 16:38:44 AEST 1983


About the C EOL terminator for strings:

It should not be possible to have strings overlap lines, as you
suggest. This would be hard to read, and has the potential to cause
some really frustrating errors. The real problem is that C has no
string operators. If you could use, say, the + operator to concatenate
strings, then no one would ever have to split printf format strings.

There is no reason for C not to have these. True, there are functions,
but infix operators are far more readable than prefix function calls
in most applications where you do a lot with strings (even for a
Lisp hacker like myself); also, the compiler cannot evaluate constant
string expressions at compile time if functions are used.

Tim Maroney



More information about the Comp.lang.c mailing list