News for hackers. Stuff that matters.
Re:C Template Library by smlckz on Wednesday December 30, 2020 @05:17AM (#25580378)
You do not need variadic macros!

        #define foreach(container, variable, iterator) \
        for (JOIN(container, it) iterator = JOIN(JOIN(container, it), each) (variable); \
        !iterator.done; iterator.step(&iterator))
Is this less nice? I personally do not like dangling )'s [I did not have to write DOS batch scripts :D]
Re:C Template Library by glouwbug on Wednesday December 30, 2020 @01:17PM (#25584311)
Amazing, I can drop the variadic macro.

EDIT: Done, and thank you so much - it's so much cleaner this way

Re:C Template Library by smlckz on Wednesday December 30, 2020 @08:23PM (#25588470)
You're welcome. And you might like to see ''sys/queue.h'': https://github.com/openbsd/src/blob/master/sys/sys/queue.h