logoalt Hacker News

SuperV1234yesterday at 8:48 AM1 replyview on HN

  #include "to_enum_string.h"
You don't have to understand it to use it. Even then, it's not that hard to understand, it just looks unfamiliar.

Replies

shoolyyesterday at 3:03 PM

So finally, it's NOT built-in, and the parent comment was showing that in other languages - it IS built-in. So your code example is NOT correct and comparison is NOT correct, because you just hid the most important part of it, which is the implementation, that the user has to either: a) write themselves, b) find somewhere on the Internet.

show 1 reply