Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Even if you get a grasp on their syntax, I've almost never been in a situation where they could be used.

Parameter packs can make some ugly code substantially simpler, IMHO. For example, I contributed some changes to the Godot C++ bindings a couple of years ago that made a number of super common functions variadic instead of having to create and pass in collections (eg debug printing, specifying argument types when registering signals, stuff like that). While not a strictly necessary change, it makes the resulting code easier to read. Parameter packs allow this.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: