Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Programming exercise/challenge
Date: Tue, 08 Dec 2020 23:03:06 -0800
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <86czzj7979.fsf@linuxsc.com>
References: <86wnxwkyol.fsf@linuxsc.com> <871rg2rffu.fsf@bsb.me.uk> <86v9dehts2.fsf@linuxsc.com> <87360hq0si.fsf@bsb.me.uk> <1bpzH.151400$zz79.48736@fx17.ams4> <87mtypoi5i.fsf@bsb.me.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="5eb73538a536c16dceb299f9d9a18884"; logging-data="24239"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180kTFQOgDMmMprlY66nubTi6GAcbYxa8c="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:C9ya6ODEf2RiPEMTIcS0/BzxwVM= sha1:TE2ihIfVwf7GEYkVqZ8Ged5HWY4=
Xref: csiph.com comp.lang.c:157121
Richard Damon writes:
> On 12/7/20 9:31 AM, Bart wrote:
>
>> On 07/12/2020 14:18, Bart wrote:
>>
>>> (Except I don't personally agree with splitting tokens across lines,
>>> so will not implement it. Anyone who splits "//" across two, or
>>> possibly N lines, should be fired.
>>>
>>> It's not even a feature that would allow arbitrary insertion of
>>> \ anywhere (eg. inside string literals, or just before an
>>> existing \) so I can't see the point.
>>
>> I keep forgetting that \ would be followed by , so maybe it
>> /is/ possible to allow it everywhere, even put every character of a
>> source file on its own line.
>>
>> I still think it is not necessary to allow tokens to be split across lines.
>>
>> Actually it's funny that C allows so much freedom with \ given that,
>> unlike many languages, C hardly ever needs to use \ to continue code
>> into a following line. (I think only for macro bodies; the //abc\ case
>> is a misfeature.)
>
> I think it came about as C was (is?) a common 'output' language for many
> code generators, and coupled with fixed 80 column screens, having a
> fixed output width of the code was important, so being able to just
> split the code anywhere was useful.
I expect it came about in the very early days of C when the C
preprocessor was a completely separate program and knew nothing
of C syntax, in which case having it be completely independent
of the language syntax is about the only thing that makes sense.