What is Nostr?
THE MARTYR OF BUTLERIAN JIHAD /
npub14zu…7yp7
2024-02-18 00:34:09

THE MARTYR OF BUTLERIAN JIHAD on Nostr: Let me tell you how much I hate C. Imagine some genius wrote a function-like C macro. ...

Let me tell you how much I hate C.

Imagine some genius wrote a function-like C macro. For example,

#define FUCK() really_fuck(&you)

So far so good? Not quite. What if it's wrapped in conditional compilation pragmas?

#ifdef USER_IS_FUCKEDdefine FUCK() really_fuck(&you)

#endif

This might even work. But! Imagine if that condition is missed and the macro is left undefined. What happens to the code that uses this macro?

In C, a call to an undeclared function isn't an error but a warning, and it's often allowed to pass (wtf is -Wall lmao). Adding insult to injury, imagine you build not an executable but a shared library. This way, the error happens... in runtime! Now sprinkle not just one conditional macro but a few dozen, scattered all over code. Make sure that includes order actually matters and that headers to not include each other directly. Now you know how I've spent the past three days.

I fucking hate C. It's a retarded abomination of a language and anyone using it seriously needs to have his genitals cauterised with a glowing hot piece of rebar inserted into urethra.
Author Public Key
npub14zues5n3z7schvkwaausr8q2jsct8pzcncgkp0l5rye4t7ar5rvq397yp7