O'Reilly logo

Seven More Languages in Seven Weeks by Bruce Tate, Jack Moffitt, Frederic Daoud, Ian Dees

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required