bug-bash
[Top][All Lists]
Advanced

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

Re: which paradigms does bash support


From: Marc Weber
Subject: Re: which paradigms does bash support
Date: Wed, 14 Mar 2018 10:47:09 +0100
User-agent: Sup/0.22.1

Excerpts from Pierre Gaston's message of 2018-03-14 09:22:45 +0200:
> > On 26/01/15 13:43, Greg Wooledge wrote:
> > > On Sun, Jan 25, 2015 at 08:11:41PM -0800, address@hidden wrote:
> > >> As a programming language which paradigms does bash support.
> > Declarative, procedural, imperative?
Read code like 'topgit' and you'll understand that there is a reason why
alternate programming languages do exist for complex programs.

I'm not a shell export, but I don't know how to return a list in bash.

You can get quit far with shell scripts depending on what you do.

But seriously - why not just use Python/Perl/Ruby/... ?

some paradigms
* global functions/ vars / some global state (eg how glob patterns
  behave)
* builtin background processing by using &
  leep 10 & sleep 10 & wait
* propagate exit codes by false && true && true (only first will be run)
* signal handlers and clreanup hooks
* hashes, lists, but syntax is wired (IMHO)
  => can you return lists?
... -> so for anything complex use a real language, please.

Marc Weber



reply via email to

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