Built by a team of veteran open-source contributors within Facebook, Skip is described by the developer team as “a programming language to skip the things you have already computed.” After three years, the project has left active development and has been open sourced.
The team wrote that the statically-typed language is experimental, with a goal to “explore language and runtime support for correct, efficient memoization-based caching and cache invalidation.”
The primary feature of the Skip language is its support for caching with reactive invalidation, according to the team, allowing for “precise tracking of side effects, including both mutability of values as well as distinguishing between non-deterministic data sources and those that can provide reactive invalidations (telling Skip when data has changed).” This essentially determines the safe bounds for memoizing the results of an expensive function call so that it can be referred to without further calls, at least until the underlying data is changed and potential side effects are detected, they explained.
Skip’s side effect tracking also allows for safe parallelism by ensuring that asynchronous computations can’t refer to mutable state and preventing thread safety issues. “Skip supports two complementary forms of concurrent programming,” the team wrote. These are ergonomic asynchronous computation with async/await syntax and direct parallel computation.
The team also highlights the project’s support for “efficient and predictable” garbage collection utilizing “a novel approach to memory management that combines aspects of typical garbage collectors with more straightforward linear (bump) allocation schemes,” which minimizes memory scanning by only focusing on memory reachable from the root of a computation.
With contributions to ActionScript, C#, Flow, Hack, HHVM, Prettier, React Native, and Relay under its belt, the team wrote that it developed Skip as a hybrid of ideas from functional and object-oriented styles.
“Like functional languages, Skip is expression-oriented and supports abstract data types, pattern matching, easy lambdas, higher-order functions, and (optionally) enforcing pure/referentially-transparent API boundaries,” the team wrote. “Like imperative/OO languages, Skip supports classes with inheritance, mutable objects, loops, and early returns. Skip also incorporates ideas from “systems” languages to support low-overhead abstractions, compact memory layout of objects via value classes, and patterns that ensure code specialization with static method dispatch.”