Elektrine lite

← Feed

@Steel_Virgin@eldritch.cafe

Post #1981520

2026-05-04 12:31 UTC

@typeswitch it sounds like forbidden things to do in an hidden .h that you hope no one finds. But it lets you write for ennumerate() like it's built-in. And it make mister boss happy because he has no idea its not a regular C syntax but he understands because it looks like the python 101 course he once had in 2008. anyway thank you for the explanation :3

Replies (2)

  • @Steel_Virgin@eldritch.cafe 2026-05-04 12:36

    @typeswitch it reminds me of my experiments in collège (secondary [uk]/ middle [us] school), where I tried to do code that looks like Object Oriented in C by storing function adresses in structures, so the main.c could look like the oo programming was built-in.

    Open ##1981521

  • @JamesWidman@mastodon.social 2026-05-04 16:50

    @Steel_Virgin @typeswitch fwiw, if you have clangd set up in your editing environment, and if you place the cursor on an invocation of a macro, the editor should give you the option of replacing the invocation with the result of expansion (where, to follow the example above, there would be no instances of x##y, and you would instead see instances of 'fooy' or 'foobar'). it's great; i use it wherever i see an invocation of a new-to-me macro, and it makes the code intelligible way more quickly.

    Open ##1981524