DEV Community

Discussion on: Default parameters in C

Collapse
 
seanlumly profile image
Sean Lumly

Neat!

I like the argument counting. It is quite a clever use of the variadic macro, effectively "pushing" the argument count value into range with the number of arguments. I've not seen this before, nor considered it.

I was never a fan of variadic functions either, and this gets me thinking of other creative ways to mimic the behaviour.