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

On the Windows team at Microsoft where I work, we work around the lack of actual named parameters by putting parameter names in C-style comments. To illustrate, given a hypothetical list class with a sort method like Python's, with a boolean "reverse" parameter, we'd call that method like this:

    list.sort(true /* reverse */);
This convention is very handy for certain Win32 functions that take lots ofparameters, such as CreateProcess or CreateWindowEx.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: