4 ms·
What's the reason behind writing automation tooling in C instead of higher level languages? The usual (portability, performance) don't seem to apply at first gl
by kubb 4y ago
What's the reason behind writing automation tooling in C instead of higher level languages? The usual (portability, performance) don't seem to apply at first glance.
- mkovach 4y agoMy thoughts exactly. I love using expect, but why would I write a C program when I quick and simple TCL script (expect is build with TCL and is threaded and easy to make thread-safe scripts). There are also expect clones in Python and Perl (probably others, but I know and have used those both) if TCL is an issue for you. This looks nice, but I don't see if as very useful.
- elcaro 4y agoOne potential use case could be in creating bindings for other languages that do not have an expect like module. Since it reportedly has a "saner interface than libexpect", it might be less hassle creating FFI bindings to mini-expect.
- rwmj 4y agoBecause the program it's used in is written in C too, as is most software that runs on Unix-like systems. It uses and depends on another C library (PCRE). The P2V system has to fit on a small bootable ISO, so minimising code size and dependencies is an overriding concern. Also it was written in 2014.
- sim7c00 4y agolove it, only knew expect from python, so quite happy to find a c library :D thanks!! (stubborn person who would write a website in C here!!)