logoalt Hacker News

ueckeryesterday at 8:35 PM2 repliesview on HN

Are X macros awkward? I find them very straightforward and clear.


Replies

spacechild1yesterday at 8:42 PM

The implementation doesn't look too bad, but the usage is terrible:

  #define E_LIST(X) \
      X(V0) X(V1) X(V2) X(V3)

  DEFINE_ENUM(E, E_LIST)
That's not how I want to declare my enums...
show 1 reply
psyclobeyesterday at 9:40 PM

They are gross but... effective so shrug