Re: [Github-comments] [geany/geany] GI compatible msgwin_*_add (#1748)

2018-04-07 Thread Matthew Brush
> I'd argue that, for future APIs, we don't export variadic ones. These are > generally just for convinience. But plugins can easily do their own string > formatting and give us the result. Of course it's for convenience. Imagine writing the following line of code without using any functions wi

Re: [Github-comments] [geany/geany] GI compatible msgwin_*_add (#1748)

2018-04-07 Thread elextr
> > Of course it's for convenience. Imagine writing the following line of code > > without using any functions with variadic arguments: > printf("%s is %d", name, age); ``` std::cout

Re: [Github-comments] [geany/geany] GI compatible msgwin_*_add (#1748)

2018-04-07 Thread Matthew Brush
> To be fair to GI (what! me saying that!) most languages do not have variadic > functions, so the GI has nothing to translate into. Python: ```python def foo(*args): for a in args: print(a) ``` JavaScript: ```js function foo(...args) { for (let a of args) print(a); } ``` Ruby: `

Re: [Github-comments] [geany/geany] GI compatible msgwin_*_add (#1748)

2018-04-07 Thread elextr
Ok, so I forgot to specify "C style variadic functions", being able to call their own functions with variable arguments isn't the same as calling a C function that way. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https:

Re: [Github-comments] [geany/geany] GI compatible msgwin_*_add (#1748)

2018-04-07 Thread Matthew Brush
They don't need to call C directly, GI just needs to generate the appropriate adapters in the typelib. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/1748#issuecomment-379458442