Re:From Competitive Programming to APL
by buescher on Friday June 04, 2021 @12:04PM
(#27395017)
He is, of course, talking about things like this (from the "J incunabulum"):
Which is actually pretty concise and readable. Sometimes I think it would be nice if enough people could agree on a header library of "concise C" macros that they could become part of the idiom. Or at least a minority dialect instead of an idiolect.
[ Parent
| on HN ]
Re:From Competitive Programming to APL
by CyberDildonics on Friday June 04, 2021 @12:18PM
(#27395183)
This still makes you put the execution as a macro argument, but the benefit comes from the fact that most of the time a loop can just go from 0 to a given number.
If just the for loop is in the macro you can put the braces in yourself.
If the braces are up to you, nested loops are cleaner.
DO(y,height) DO(x, width) blur(x,y);