help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Why bash does not recoganize array type smartly?


From: Dan Douglas
Subject: Re: [Help-bash] Why bash does not recoganize array type smartly?
Date: Wed, 16 Mar 2016 14:22:41 +0000

On 3/16/16, Chet Ramey <address@hidden> wrote:
> On 3/15/16 9:12 PM, Dan Douglas wrote:
>
>
>> Bash could do the same with some extra syntax to represent glib
>> collections it could do a lot without having to re-invent the wheel.
>
> Such as?

Glib is interesting because 1) it implements many common complex data
types (and operations on them) so you don't have to 2) many languages
and libraries already expose APIs through glib objects, so
interoperability is easier (fewer name mangling nightmares and SWIG
generated wrapper libraries for non-C languages) 3) it has a lot of
functionality besides collections that bash could conceivably make use
of for new features 4) it's C, and really the only C library I'm aware
of that does everything that it does.

You mentioned you were interested in improving Bash's plugin system.
Glib seems like a rather sensible way to do it. It comes with its own
plugin system 
https://developer.gnome.org/glib/2.46/glib-Dynamic-Loading-of-Modules.html
and applications that work with glib already would have an easier time
with bash if they work with the same objects.

An example problem I'm having right now that might be more easily
solved is lots of bash shells opened in tmux sessions, where If i log
in more than once and re-attach, there's no way to synchronize the
environment of all my running shells with the updated tmux session.
With dbus-glib support in bash I could potentially register a bash
function with dbus and call it from the new login session to update
the environment (without having to rely on sigusr traps).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]