Systems engineer and Open Source contributor/maintainer. Has his head in the clouds, CI, virtualization, containerization, orchestration. Loves those ations....
While aliases are probably more common, Bash does have functions, but maybe not what you consider a "real function"? Also variable substrings being built in, as well as index and associative arrays. However, I also like the 5 line rule, although I'll admit my limit is probably closer to 15, +/-5.
That said I also try to avoid Bash scripting even before that limit. While I dable in JavaScript, Typescript, Node and Rust, I actually try to use Python as soon as possible. I find it elegant and simple compared to most languages. Even though it's dynamic, Typing can be achieved in a number of ways. Unit tests are pretty simple to achieve as well. As for package management I use pipenv when I want a unique venv which doesn't taint my git repo or require .gitignore or .git/info/exclude entries, plus it provides a nice way to lock versions as well as define actual requirements separate than those just for development (unit testing etc.) and then generate a requirements.txt file to be included in the repository.
When it comes to something where performance is a concern I see if compiling my Python script via codon into native machine code is viable. When it works it can beat the pants off C++ and many other languages. This is also becoming simpler to do with Codon creating native versions (ports?) of modules as well as supporting imports for many of the native Python modules too. I only hope they keep picking up speed on creating new releases to continually make it easier to compile and reduce the performance gap between Python and most other languages.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
While aliases are probably more common, Bash does have functions, but maybe not what you consider a "real function"? Also variable substrings being built in, as well as index and associative arrays. However, I also like the 5 line rule, although I'll admit my limit is probably closer to 15, +/-5.
That said I also try to avoid Bash scripting even before that limit. While I dable in JavaScript, Typescript, Node and Rust, I actually try to use Python as soon as possible. I find it elegant and simple compared to most languages. Even though it's dynamic, Typing can be achieved in a number of ways. Unit tests are pretty simple to achieve as well. As for package management I use
pipenvwhen I want a unique venv which doesn't taint my git repo or require.gitignoreor.git/info/excludeentries, plus it provides a nice way to lock versions as well as define actual requirements separate than those just for development (unit testing etc.) and then generate arequirements.txtfile to be included in the repository.When it comes to something where performance is a concern I see if compiling my Python script via
codoninto native machine code is viable. When it works it can beat the pants off C++ and many other languages. This is also becoming simpler to do with Codon creating native versions (ports?) of modules as well as supporting imports for many of the native Python modules too. I only hope they keep picking up speed on creating new releases to continually make it easier to compile and reduce the performance gap between Python and most other languages.