Hacker News new | past | comments | ask | show | jobs | submit login

JavaScript has named parameters, in sort of the same way that C has named parameters.

Get used to writing your functions using objects for the arguments:

  function myFunc({ foo, bar }) {}
Then you can call

  function myFunc({ foo: 1, bar: "x" })
Similarly in C/C++

    struct MyFuncArgs { int foo; char bar; };
    void myFunc(MyFuncArgs args) {}
    myFunc({ .foo = 1, .bar = 'x' });



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: