Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #404184

Re: p = {1,0,0}

From David Brown <david.brown@hesbynett.no>
Newsgroups comp.lang.c
Subject Re: p = {1,0,0}
Date 2026-11-10 13:57 +0100
Organization A noiseless patient Spider
Message-ID <11cv4c8$25c1j$1@dont-email.me> (permalink)
References (17 earlier) <11cq3hb$dnf9$1@dont-email.me> <11ctijh$1mb1u$1@dont-email.me> <11ctr0o$1or07$1@dont-email.me> <11cukc4$1vnj7$1@dont-email.me> <11cv2mt$24ofb$1@kst.eternal-september.org>

Show all headers | View raw


On 10/11/2026 13:29, Keith Thompson wrote:
> David Brown <david.brown@hesbynett.no> writes:
> [...]
>> Or look at C.  It is not exactly a challenge to have :
>>
>> #define For(_var, _limit) for (int _var = 0; _var < _limit; _var++)
>>
>> and then you can write :
>>
>> 	For(i, 100)
>>
>> With a little more effort, you can even make a single macro that could
>> handle :
>>
>> 	For(100)	// Automatic anonymous variable
>>
>> and
>>
>> 	For(i, 1, 100)	// If you don't want to start at 0
>>
>> It is ludicrous to get annoyed about the "lack" of a feature in a
>> language when the language has all you need in order to provide that
>> feature.  (It is fine to say you would /prefer/ if this feature were
>> available out-of-the-box in C - that's just personal preference.)
> 
> I don't entirely agree.  Yes, you can create macros that make C
> look like something else (I've done it myself).  But any such
> macro almost creates a new language that anyone reading the code
> has to be familiar with.
> 
> If I see `For(100)`, I have to find out how it's defined *and*
> understand the `for(...;...;...)` code that it expands to.8
> 
> If I thought C would benefit significantly from a Pascal-style for
> loop (I don't), I'd want it added as a language feature, not hacked
> by multiple incompatible macro definitions, one per project.
> 

For a feature that really is useful, and where the change really does 
make a big difference to the language, then I agree.  A key indicator of 
that is when people /do/ make multiple incompatible definitions to 
provide the feature.  (Booleans is a prime example for C.)  When it is a 
minor matter that few people even think about, such as the way "for" 
loops are written in C, then it is entirely unrealistic to imagine it 
being added to the language.  Given that, I think it would be better for 
bart to make and use a "For" macro in his own C programming (if he does 
any now), rather than getting annoyed about how "for" works.  It would 
be even better for him to simply use C's "for" /without/ getting 
annoyed, if that is an option.


Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-01 14:32 +0100
  Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-01 13:41 +0000
    Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-01 15:10 +0100
      Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-01 16:13 +0100
        Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-02 16:46 +0100
    Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-02 17:36 +0100
      Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-02 18:47 +0000
        Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-02 20:54 +0100
          Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-02 20:56 +0100
        Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-02 21:29 +0100
          Re: p = {1,0,0} Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-11-02 21:39 +0100
          Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-02 22:58 +0000
            Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-03 11:09 +0100
            Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 13:19 +0100
              Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-03 14:07 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 15:45 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 15:54 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 16:48 +0100
            Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 14:29 +0100
              Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 14:42 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 16:09 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 16:18 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 16:38 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 16:55 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 17:06 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-03 16:26 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 17:34 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 17:47 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 17:54 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 22:08 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-04 14:14 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-04 14:27 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-05 19:10 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-05 19:38 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:14 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:18 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:19 +0100
                Re: p = {1,0,0} Richard Harnden <richard.nospam@gmail.invalid> - 2026-11-08 09:29 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:24 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:26 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-07 22:18 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 04:17 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:50 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-07 22:23 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 04:20 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 04:36 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 04:46 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 16:20 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-08 17:18 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 19:17 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 19:36 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 19:41 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-08 11:19 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 12:44 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 12:56 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 13:12 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 16:12 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-09 23:47 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-09 23:56 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-10 01:11 +0000
                Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-10 09:24 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-10 12:08 +0000
                Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-10 13:50 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-10 13:53 +0000
                while() and do/while() Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-11-10 11:47 -0800
                Re: while() and do/while() bartc <bc@freeuk.com> - 2026-11-10 20:33 +0000
                Re: p = {1,0,0} Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-11-10 04:29 -0800
                Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-10 13:57 +0100
                Re: p = {1,0,0} Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-11-10 08:57 -0800
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 13:51 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 14:08 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 14:17 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 14:22 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-10 14:27 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:32 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:44 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:51 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 16:10 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 16:24 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 16:38 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 16:54 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 17:09 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 17:16 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 17:20 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:09 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:13 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:17 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:24 +0100
      Re: p = {1,0,0} Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-11-02 14:52 -0800
        Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 13:29 +0100

csiph-web