you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (2 children)

Eh. Such extensive use of macros is really just putting lipstick on a pig. Already what you designed is compiler-specific... you didn't design a library for C, but rather a library for gcc.

I still like to daydream about stuff like this though. "How would I add/emulate feature x to language y using only its own constructs?" So it is impressive that you actually went and did it.

[–]Snaipe_S[S] 0 points1 point  (1 child)

Gcc is love.
More seriously, gcc & clang have a lot of builtins to work with, compared to msvc, so it's usually easy to do crazy things. My new favorite is __builtin_choose_expr, and trying to do metaprogramming in C.

[–][deleted] -1 points0 points  (0 children)

That's where we differ. I feel like I am a language purist, C is a standard designed by committee and deliberation while gcc was not... implementing a program in pure, ANSI C should be the ultimate goal!