Web lists-archives.com

Re: Functional programming with GLib




Hi Philip,

On Thursday Apr 27 2017, Philip Withnall wrote:

> Hey,
>
> The general policy for GLib is that utility functions which are useful
> (and used in) several projects are considered for being added to GLib.
>
> To me, a functional programming approach using GLists is not something
> which every project is going to use. Is there any harm in keeping it as
> a separate library? There’s nothing stopping projects from linking to
> GLib *and* GXLib. :-)

> The command line parsing stuff you have looks a bit more widely
> applicable. Were you considering merging those into GLib?
>
> http://www.djcbsoftware.nl/code/gxlib/gxlib-Command-line-parsing.html
>
> Anyway, nice work on GXLib. It looks well documented.

Thanks! Yeah, the functional approach may not be for everyone, though of
course one could argue that that didn't stop C++, Rust etc., but true,
there's value in keeping GLib lean.

The command-line stuff is an attempt to trick the GLib option-parser
into working with sub-commands, and it's been quite a time-saver for
some of my projects. Still, it is a bit clumsy in places, since it the
GLib option parser doesn't expose some of the details that would be
useful.

But as Emmanuele mentions, perhaps some bigger/braver effort would be
better.

Anyway, I'll keep GXLib around for my own projects and for whomever. In
fact, I'd happily take contributions for "GLibberish" code that doesn't
quite fit into GLib.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema                  Helsinki, Finland
e:djcb@xxxxxxxxxxxxxxx           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-devel-list