Web lists-archives.com

Re: Number of dynamically linked libraries (Was: Re: Gtk+4.0)




On Wed, Jun 22, 2016 at 05:19:19PM +0100, Simon McVittie wrote:
> If there is a compelling advantage to splitting up libraries, of course,
> by all means do so.

I have an example: gspell:
https://wiki.gnome.org/Projects/gspell

The non-GUI parts could be implemented in GIO, with an extension point
to not hard-depend on Enchant. And the GUI parts could be implemented in
GTK+.

I created gspell as a separate library for a few reasons:

With a GIO extension point, a new library would anyway need to be
created. And I thought that dlopening a library was as bad for startup
time as a hard dependency. Now I know that a GIO extension point would
actually be slightly better.

Be able to iterate on the API more freely, and have something working
(and used in several apps) in less time. Now gspell-1 has a stable API,
but nothing prevents me from bumping to gspell-2 to break the API,
making the new major version parallel-installable. In GIO, it is not
possible.

Be the maintainer. If I wanted to integrate spell checking in GIO and
GTK+, I would still be busy with that project. With a separate library,
it was done in 6 months, working on and off on it (and part-time).

Having the code self-contained. Having all the spell-checking related
code in one repository. The biggest *.c file contains 1400 lines. Mixing
all that code in GtkTextView would make the code less clear, in my
opinion.

--
Sébastien
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-devel-list