[maemo-developers] implementation of 2-dimensional array in bash - kind request

From: Jason Edgecombe jason at rampaginggeek.com
Date: Sun Jul 6 17:47:42 EEST 2008
William Gordon Rutherdale wrote:
> C is a good solution.  So is Perl, which comes on OS 2008.  So is 
> Python.  Perl lets you construct nested lists, which gives you the 
> equivalent in capability to multi-dimensional arrays.  Python gives 
> similar constructs.
>
> There is no reason IMHO to be writing shell scripts of any kind on a 
> system where Perl and Python are available.
>
> Shell programming is just weak for many reasons including lack of data 
> structure capabilities and should be avoided whenever possible.  I say 
> this as someone who has accumulated years of shell programming 
> experience in a professional software shop as well as other languages.
>
> The strongest of the shell programming languages, namely bash and ksh, 
> have this problem.  Perl and Python are practical for exactly the reason 
> that they are good replacements for these shell languages.
>
> -Will
I agree with you here that perl and python are easier to do complex 
things with than bash or ksh, but I wanted to point out that python may 
be the better choice on the Nokia tablets. Perl is my favorite language, 
but the perl install on the tablets is missing a lot of the standard 
modules. For example, 'perl -e "use English;"' gives an error. python 
seems to be a more complete install and even includes gtk, so it's 
arguably the best choice of scripting language for the platform given 
what's preinstalled and in extras.

Sincerely,
Jason

More information about the maemo-developers mailing list