Abstracting away glib?
Mourad De Clerck
mourad at aquazul.com
Mon Feb 2 12:15:51 UTC 2009
Hi all,
I was very happy to see renewed interest and development in mc, probably
one of the programs I use most often.
I've seen Patrick Winnertz mention this on his blog, and was wondering
about the reasoning behind it:
* Added a micro helper library in order to go slowly avay from glib
I thought this was a bit surprising - from what I understand from the
mailing list archives, the reasons for this are:
a) memory requirements
-> as you probably know glib is being used for a lot of projects, to the
point that it's hard to avoid at all, even on embedded; on platforms
with really constrained memory (easy to OOM) glib is probably not ideal,
but to be honest, I can't imagine running mc on those either;
b) performance
-> Enrico Weigelt mentioned some ways in which glib is underperforming
or adding unnecessary abstractions. I'd argue that if it's just the
implementation, it should be fixed in glib itself; I also wonder what
kind of performance gains we're talking about here, whether they're
worth it.
c) possible interface breaks
-> I think every library has those, but I also think glib has been
better than most in maintaining the compatibility since their last major
API break 7 years ago. Considering the number of projects using it,
they're more than careful not to do anything crazy. Things get added and
deprecated, obviously (like the g_strcasecmp() Enrico mentioned,
deprecated since 2.2 six years ago); but that's a good thing, I think.
Now, don't get me wrong: if glib gets in the way of your esthetic
senses, or you dislike it for some other reasons, feel free to toss it;
I'm already grateful people are taking an interest in mc at all. But I'd
expected you to start using more of glib, instead of less. Because it's
well tested and in wide use, and because you can take advantage of
features that glib implements so you don't have to implement or maintain
these; stuff like GIO/GVFS, win32 portability, etc.
Either way, thanks for picking the Midnight Commander up - I look
forward to the new releases.
Mourad
More information about the mc-devel
mailing list