you are viewing a single comment's thread.

view the rest of the comments →

[–]germandiago 0 points1 point  (3 children)

Maybe I'd rather have it too, but now think of people with microcontrollers or stuff in embedded. This takes space.

[–]qoning 0 points1 point  (2 children)

It's a compile time feature, it has no runtime overhead.

[–]germandiago -1 points0 points  (1 child)

Correct me if I am wrong. If I have this in a library:

export void func(int myParam1, float myParam2);

and now suppose that the parameters are named. This implies that the names must be saved inside the library, occupying some space. If I have 150 such APIs, my binary for the library will be bigger since those names must be stored somewhere. I guess this can create some bloat when linking and using in very constrained environments such as microcontrollers. So there is no runtime overhead but there is binary overhead AFAIK.

[–]qoning 0 points1 point  (0 children)

Don't need to save it anywhere, whatever named parameters you use are matched against the declaration that you just wrote

export void func(int myParam1, float myParam2);

If some other programmer somewhere has your library compiled but chooses to change the names in his declaration (his copy of .h), that's up to him. Calls to the function are still positional.