Adding Unpack Syntax to RCL
ruudvanasseldonk.com·3h·
Discuss: Hacker News
📝Concrete Syntax
Preview
Report Post

written by Ruud van Asseldonk published 7 December 2025

I am building a new configuration language and json query tool: RCL. It extends json into a simple functional language that enables abstraction and reuse. Rather than string templating serialized data, RCL enables you to template data structures directly. A common operation here is to build lists and dicts out of other lists and dicts. While RCL had several ways to do this, I wasn’t satisfied with them. I wanted unpack. In v0.11.0 I finally implemented this feature, and you can now use .. and ... to unpack lists and dicts:

let xs = [3, 4];
let ys = [1, 2, ..xs, 5, 6];

let defaults = { kind = "fruit", tasty = true...

Similar Posts

Loading similar posts...