I tried Rust but it was too much for my small brain and seeing multiple blog posts about people spending years with it and still not getting the borrow checker down perfectly is putting me down a little. Perhaps I'll try it again down the line.
I tried Rust but it was too much for my small brain and seeing multiple blog posts about people spending years with it and still not getting the borrow checker down perfectly is putting me down a little. Perhaps I'll try it again down the line.
You can even write a "script" by putting "#!/usr/bin/nim r" at the top of your file (like #/bin/sh) and making it executable. (With nim r the compilation will be cached and so not require much time at all.) I would not call Nim a scripting language as typically understood (e.g. with 100 usec to 15 msec startups), but both compile|use cached & run makes it more similar than most alternatives. pypy3 on an empty file on the same machine as the above timings takes 40 ms, for example.
There is also a mode called "nim script" where rather than running an external C/C++/nodejs compiler a restricted subset can be compiled and run right on the same VM Nim uses for its Lisp-like macro facility. That only takes about 100 ms, but the savings relative to 200..250 ms with no subset restrictions may not be very compelling.
TL;DR is that Nim gives you a lot of options. In this and in most things, really (memory management, code style, etc., etc.).