Using Rust for 'Scripting'
I love this idea. There&#x27;s an implicit assumption that the reason scripting languages are suitable for scripts is that they play fast and loose with type systems, which allow enough shortcuts and escape hatches to be productive.<p>But that&#x27;s only part of the story. Along with typing, scripting languages also had the major advantage of being fast to bootstrap and run (`ruby script.rb`) and were fully &quot;batteries included&quot; with good standard libraries.<p>These assumptions are certainly true, but they&#x27;re much _more_ true when you&#x27;re comparing them against &quot;old world&quot; languages like C, C++, or even Java. All of these require significant project scaffolding just to get running, and have varying levels of useful built-in utilities (C has almost nothing, C++ has the STL and maybe Boost if you&#x27;re generous, and Java tried to have a useful core, but missed the mark in a number of places like HTTP). In the case of C and C++, complex build logic may also be required in the form of autoconf&#x2F;automake&#x2F;make.<p>Newer compiled languages like Rust just don&#x27;t have these issues anymore (I&#x27;d also include Go, Crystal, and some others in the list). Project scaffolding is built right into the language (Cargo) and the standard library is about as complete as you can get (and probably better than the classical scripting languages — all of Ruby&#x2F;Python&#x2F;Perl missed a good API for some things like HTTP, which led to the rise of separate packages like Faraday&#x2F;Requests&#x2F;etc). Anything that&#x27;s not in the standard library is easily retrievable through great package managers that are bundled in with the core language.<p>After you&#x27;re over the initial learning curve of the language and standard library, it&#x27;s possible to be nearly as productive in something like Rust as you can be in Python. As a bonus, you can also get reasonable reassurance that your program is correct before you run it — and even without writing an exhaustive test suite that exercises every line of code.