@shirase, I heartily
applaud what you are doing, and I have done it many times myself. "CPU/GPU/RAM usage" – these days – is entirely irrelevant (IMHO) in contrast with the
purely human(!) considerations of
clarity.
The only "shell" that I am aware of which attempted to include a "serious" programming language was Dr. Korn's
ksh, which today is rarely used or even spoken of. The very-primitive scripting capabilities of
bash certainly do not qualify. But, this is precisely why we have the
"#!" ("shebang") feature, which allows
any(!) language to be used to implement "a shell script."
These days, we have "hardware resources in embarrassing abundance." But we still spend a fortune
(the recipients call them, "salaries" ...) on the
humans, so we do not want to waste these humans' time ... time spent "puzzling out" what the code in front of their faces actually does. (And especially, "getting it wrong.")
Now – to be fair – much of the code that we still encounter today was written at a time when "hardware resources and memory" were at an absolute premium. The programmers of that time
(koff, koff ... ) did what they had to do, using the only thing they had:
toys.
As you proceed with your efforts, be sure that your team recognizes this as a
formal project, and applies necessary "deployment" and "quality assurance" efforts to it.