Deutsch English Français Italiano |
<vjl3hh$6pk3$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: bart <bc@freeuk.com> Newsgroups: comp.lang.c Subject: Re: question about linker Date: Sat, 14 Dec 2024 23:14:58 +0000 Organization: A noiseless patient Spider Lines: 77 Message-ID: <vjl3hh$6pk3$1@dont-email.me> References: <vi54e9$3ie0o$1@dont-email.me> <20241129142810.00007920@yahoo.com> <vicfra$13nl4$1@dont-email.me> <20241129161517.000010b8@yahoo.com> <vicque$15ium$2@dont-email.me> <vid110$16hte$1@dont-email.me> <vifcll$1q9rj$1@dont-email.me> <vifiib$1s07p$1@dont-email.me> <87ldwx10gv.fsf@bsb.me.uk> <vimtt4$27vv$1@dont-email.me> <vin7r2$49d1$2@dont-email.me> <vinalt$5qoh$1@dont-email.me> <vipgns$rjqn$1@dont-email.me> <viqbl8$12mum$1@dont-email.me> <viqfuh$131h8$2@dont-email.me> <vjkp5b$27hva$1@paganini.bofh.team> <vjktle$5sfr$1@dont-email.me> <877c81vras.fsf@nosuchdomain.example.com> <vjl1ab$69qg$1@dont-email.me> <8734ipvptd.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 15 Dec 2024 00:14:57 +0100 (CET) Injection-Info: dont-email.me; posting-host="178d3803084f207cadffeb141ca52cd0"; logging-data="222851"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18gxIfa5UQOfbjj6oJ4CjeP" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:xVG6nEPrZgcO2Cq5BISdqgz3SkI= Content-Language: en-GB In-Reply-To: <8734ipvptd.fsf@nosuchdomain.example.com> Bytes: 4127 On 14/12/2024 22:54, Keith Thompson wrote: > bart <bc@freeuk.com> writes: >> On 14/12/2024 22:22, Keith Thompson wrote: >>> bart <bc@freeuk.com> writes: >>>> On 14/12/2024 20:17, Waldek Hebisch wrote: >>>>> Bart <bc@freeuk.com> wrote: >>> [...] >>>> For the same reason that f(1 2 3) might be unambiguous, as usually >>>> it's written f(1, 2, 3). >>>> >>>> Actually, since C likes to declare/define lists of things where other >>>> languages don't allow them, such as: >>>> >>>> typedef int T, U, *V; >>>> >>>> struct tag {int x;} a, b, c; >>>> >>>> enum {red, green} blue, yellow; >>>> >>>> I couldn't quite see why you can't do the same with functions: >>>> >>>> int F(void){return 1;}, G(void){return 2;} >>> Those are function *definitions*. Declarations, including function >>> declarations, can be bundled : >>> int F(void), G(void); // not suggesting this is good style >>> Definitions that are not declarations, such as function definitions, >>> cannot. >>> I thought you liked consistency. >> >> Consistency would mean function definitions could be 'bundled' too. > > Declarations can be bundled. Function definitions cannot. > > More generally, some things can be bundled, and other things cannot. > > The existing rules are consistent. > > What else do you think should be able to be bundled? Macro definitions? > Include directives? > > #include <stdio.h>, <stddef.h>; // ??? The preprocessor is a separate, strictly line-oriented language. Arguably with better syntax than C itself: #if #if #endif #else #endif No dangling else here! And ... no semicolons. > C is not 100% consistent and orthogonal. It was never intended to be. > Every here knows that it isn't. If you want Lisp, whose syntax rules > are simpler than C's, you know where to find it. > > Google "foolish consistency". > >>> If the language allowed function definitions to be bundled > [...] >> I don't care about it. > > Excellent. Then let's drop it. I was idly speculating in my reply to WH. There was no need to get involved. It just seems to be the case that here: A B C D E F G Where each letter represents a declaration, statement, etc, there is no simple way of working out where any semicolons would go, whether inbetween or also at the end. You'd each to examine each each one, and also consider whether each already ends with a semicolon.