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

Matthew Brush notifications at xxxxx
Sat Apr 7 09:18:04 UTC 2018


> 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 with variadic arguments:

```c
printf("%s is %d", name, age);
```
Even if you did use one variadic function (ex. `g_strdup_printf`), it's still 3 lines of code and a potential source for leaking memory.

> This part of GI is not buggy.

Ok, it's not buggy, it's just a missing feature which makes it impossible to export all of the C API to other languages, thus requiring any bindings to C be incomplete or rewriting the C API to be less convenient.

-- 
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-379455887
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180407/c4094d47/attachment.html>


More information about the Github-comments mailing list