Backticks and the Glorious Command Literal
2019-07-24, 11:30–11:40, Elm A

Julia command literals are one of the most compelling abstractions for dealing with processes in any programming language. This talk will show what these command literals offer that similar constructs in other languages do not and how they can be used to write safer, more robust shell scripts.


Like Perl, Ruby and Bash, Julia offers backtick syntax as an abstraction for dealing with processes. However, while other languages use this syntax to invoke a shell and grab the output, backticks in Julia invoke a mini-parser for it's own safe version of a shell language and they evaluate to a command literal just waiting to be run, never invoking a shell.

This talk will go over the details of how command literals are parsed in Julia, what the resulting object looks like, and why the Julia approach to commands is a significant improvement over what shell wrappers in other languages provide (including and especially the POSIX shell itself). Of course, it will also include many examples of how to use command literals effectively.