3 ms·
Possibly dumb question: Why not write it in a compiled language like C or Go?
by diego_sandoval 3y ago
Possibly dumb question: Why not write it in a compiled language like C or Go?
- synergy20 3y agobecause it's a script, we have bash and c on a linux and we need both, same to embedded devices.
- paulddraper 3y agoBecause then you need a computer and build process. Or, pre compile it across all target platforms and have an install process.
- kkfx 3y agoPersonally because it's quick. Sometimes I just need to automate some set of CLI commands... Of course sometimes things evolve and it's time to replace the script with something more easy to handle at the new scale, but for simple stuff, meaning something that can fit a single page or two they are far quicker. BTW in a broad topic: a classic system with a user-programming language as the topmost human computer automation/interface is obviously better, but we have had such systems in the past and commercial reasons have push them to oblivion so...
- justapassenger 3y agoBash is perfect for interacting with console tools. If that’s what you need to do, C/go won’t only be much longer code, but also much harder and error prone. Command line tools are complex to deal with and there’s no magic bullet language for that.