At the beginning of May, I held a Kotlin workshop at Skills Matter in London. The attendees had to go through a series of exercises to get familiar with Kotlin’s language constructs and then do two larger exercises.

Seeing that one of Kotlin’s benefits is the ability to design nice DSL’s, I proposed that they write a JSON Builder and a Build System (i.e. the next Ant, MSBuild, Rake,…take your pick).

We divided up into groups of three people per team and each went off their own way to design their own DSL’s.

Most managed to finish both exercises, or at least finish one and start the second. We were meant to vote on the winning DSL and they’d then get a prize (namely each member of the team would get to choose a license of one of our IDE’s). Unfortunately, 30 minutes prior to ending the class, some had to leave and then I mistakenly mentioned that Beers were happening in the Slaughtered Lamb and all hell broke lose. Moral of the story: we didn’t vote.

But I’m going to keep my word. I’ve managed to collect the outcome of the different teams (or what they managed to complete). I’ve presented them below (anonymously) and leave you all to vote for which one you like the best. The winning team will then receive their prize.

Exercise JSON Builder: Create a DSL to express JSON in Kotlin and output the result to actual JSON.