Products > Programming
what would you use to replace Bash for scripting?
DiTBho:
Bash is good, but it's too error prone.
What would you use to replace it?
(excluding big elephants like Python, which I like, but it consumes too many resources)
Php ... well, it looked a good idea, after 1 year, let me say: never again!
Lua? eLua?
...
Looking for something I can use to replace my startup system scripts (/etc/init.d/*), as well as my system scripts (in /usr/bin/), currently all written in Bash-scripting.
brucehoult:
What is wrong with bash?
Perl was explicitly designed to be used instead of shell scripting. It's more or a real programming language, but with convenience features to let you use it almost like shell.
Ruby is also very good at replacing shell scripting, especially once you "require 'fileutils'", and has a lot more of the shell/perl spirit than Python does. And is just simply a better language than Python.
TCL suffers from the same problems arising from being based on text replacement as shell.
DiTBho:
I know eLua (e="e"embedded) has been used in SONY Playstation video games, embedded into the game engine.
Some text editors come with eLua built-in. Used to provide advanced (and programmable) macros facilities.
I am tempted to open a branch, replacing all the boot-scripts with Lua scripts.
You say tcl ... umm interesting too ;D
DiTBho:
--- Quote from: brucehoult on March 20, 2023, 12:05:29 pm ---What is wrong with bash?
--- End quote ---
functions are not actually functions
-> can override without a warning
-> no actual return value
-> the number of arguments is not checked
-> arguments data-type is not checked
the integer data type is simulated by external tools
-> compare two numbers is ugly, and too error prone
DiTBho:
--- Quote from: brucehoult on March 20, 2023, 12:05:29 pm ---Ruby is also very good at replacing shell scripting, especially once you "require 'fileutils'", and has a lot more of the shell/perl spirit than Python does. And is just simply a better language than Python.
--- End quote ---
seems *very* interesting.
I have to understand
- how fast it is
- how much ram it consumes
First, let learn its basic usage :D
Navigation
[0] Message Index
[#] Next page
Go to full version