Re:C's designated initializers give us named arguments
by david2ndaccount on Thursday November 19, 2026 @10:29AM
(#50561390)
I always considered this kind of a hack, needing to wrap the actual function call with a function-like macro. I wish C would add actual named arguments like I added in my DrC project: https://github.com/drpriver/DrC/blob/master/EXTENSIONS.md#na...
[ Parent
| on HN ]
Re:C's designated initializers give us named arguments
by nix0n on Thursday November 19, 2026 @10:38AM
(#50561524)
If you don't need defaults, you don't need the macro.
You still get the advantage of not scrambling the order of your same-typed arguments.
It's more verbose and a different calling convention, but it might be worth it.