3 ms·
I've been doing some research in this area: for day-to-day, quick and dirty, scripting purposes, if not Python, then what? I want something expressive: Python
by klibertp 5y ago
I've been doing some research in this area: for day-to-day, quick and dirty, scripting purposes, if not Python, then what?
I want something expressive: Python can be a bit verbose by default and isn't very good at oneliners. I want something that starts up fast, but can run a bit slower. It would be great if it had a REPL, but if compilation and/or startup are fast enough its lack would also be acceptable. The amount of available libraries is not that important, but at least https client, json and csv parsers, are a must.
I considered: V, Nim, Clojure, Scala 2, Scala 3, GNU Smalltalk, Rust, Zig, Clojure, Racket, Emacs Lisp, Raku, Ruby, OCaml, and LiveScript.
I don't have the time right now for a full write-up, but in terms of expressiveness and for scripting on the command line, LiveScript[1] won; in terms of general scripting (10-20 loc) Emacs Lisp won (I use Emacs, and the IDE-level support for Elisp there is outstanding). Raku and Ruby were runner ups in both categories.
The expressiveness of Elisp - with some extensions I made to the interpreter and a bunch of libraries I already have installed (dash, s, f, ht) - was the biggest surprise. It was on par with LiveScript, which has a lot of specialized syntax. The problem with LiveScript is that it's not very actively maintained, but it's still one of the most expressive languages I know of, and running on Node makes it quite fast and gives it access to all of NPM.
I didn't consider Haskell, because I don't know it well enough. The rest of the languages were either significantly more verbose, had unacceptable startup time, required a lot of extensions and libraries to get the expressiveness level I wanted, or had a bit too few libraries available.
[1] https://livescript.net/ https://livescript.net/ + https://preludels.com/ https://preludels.com/
- melezhik 5y agoyou may consider Raku AND sparrow - http://sparrowhub.io http://sparrowhub.io , you'll get all the benefits of Raku on high level scenarios, and you can write _underlying plugins_ on many languages (Bash/Perl/Ruby/Python/Powershell), so that will give you a certain level of freedom while transitioning from one language to another.