Jump over all the things you’ve already computed with Skip
Recently open sourced by Facebook, Skip is an experimental programming language that lets developers take any number of shortcuts for caches. Now available on GitHub, we take a look at all Skip has to offer. Grab a rock and dive right in!
Want to avoid the drudgery of re-compiling work you’ve already done? The fine folks at Facebook have a clever hack for you: Skip. This experimental programming language was designed to explore language and runtime support for correct, efficient memorization-based caching and cache invalidation.
Although the project ended in 2018, that doesn’t mean you can’t enjoy the fruits of those devs’ labor. Skip is no longer under active development. By releasing it under an open source license, Facebook hopes that community engagement can enjoy all that this cool language has to offer.
To start, Skip is a general purpose programming language. It tracks side effects to provide caching with reactive invalidation, safe parallelism, and more efficient garbage collection.
It’s statically typed with a mix of ideas from functional and object-oriented styles. Skip is expression-oriented and supports things like data types, pattern matching, easy lambdas, higher order functions, and more. However, just like object-oriented languages, it supports classes with inheritance, mutable objects, loops, and early returns. Of course, Skip also supports all the features of a modern programming language, like traits, generics, and subtyping.
However, the big deal is the caching with reactive invalidation. This programming language precisely tracks side effects like the mutability of values and non-deterministic data sources. This allows developers to see if a certain change has negative consequences. If there aren’t any side effects, developers can opt-in to safely memorize that computation. Previously cached values are invalidated when the underlying data changes.
Skip also offers safe parallelism with two forms of concurrent programming. Developers can avoid the usual thread-safety issues thanks to the above-mentioned tracking of side effects. Skip supports ergonomic asynchronous computation; it also has APIs for direct parallel computation.
There’s even a new approach to memory management for garbage collection! Thanks to the side effect tracking, the garbage collector just has to scan the memory reachable from the root of a computation. This gives developers a predictable GC overhead.