Day 1: The Call to Adventure
When we first built our system, we found writing configuration files burdensome. The file formats we could use to describe test inputs and outputs just weren’t that expressive.
Take comma-separated values (CSV), for instance. Say you wanted to describe characters and vehicles for a video game. Your CSV configuration file might start like this:
| name, treasure1, treasure2, treasure3, treasure4, treasure5 |
| knight, -1000, +200, --, --, -- |
Now, say you wanted to add a square vehicle to the in-game world, and make it so you can’t accidentally change the width without also changing the height:
| name, width, height |
| mine cart, $cube_size, $cube_size |
Here’s the problem: CSV doesn’t support collections or constraints. You’d ...
Get Seven More Languages in Seven Weeks now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.