What is Nostr?
Richard Schneeman /
npub1tjf…8266
2024-11-01 17:24:43
in reply to nevent1q…4ks8

Richard Schneeman on Nostr: I can define a const easilly enough, but then I want a way to iterate over all the ...

I can define a const easilly enough, but then I want a way to iterate over all the consts within some given scope.

I can separately add it to a const array, but that requires me to remember for every new item added and it's not easy or intuitive to code a test that would catch mistakes. I'm thinking maybe something with macros could make this easier. I'm wondering if there's prior art here or maybe I'm missing something super simple.
Author Public Key
npub1tjf3426t659w7x8yl44z2l948wmslmsp2pnta2gs9tp84r3rpawqfx8266