Skip to content
RethinkDB

Details

Most query languages are unpleasant, especially for beginners. At RethinkDB we're trying to write one that isn't. We've ended up implementing it as a Domain Specific Language for Ruby, and this talk is about what we've learned along the way. What makes a query
language good? What makes a DSL good? What parts of Ruby make it easy, and what parts make it hard? What should you watch out for if you want to write a DSL of your own?

  • Why we settled on a DSL instead of a string-based query language.

  • Error reporting and making syntax discoverable.

  • Classic DSL problems: variable capture, namespace pollution, having to learn a new syntax.

  • Ruby-specific problems: Can't overload operators based on the righthand side, can't overload some key operators, no `parameters` call on Procs in Ruby 1.8.

  • Things Ruby provides that are really nice: `caller`, block syntax, etc.

Michael Lucy Bio:
Michael Lucy is an engineer at RethinkDB working on the query language.

Photo of Silicon Valley Ruby Meetup group
Silicon Valley Ruby Meetup
See more events
Carnegie Mellon University
Carnegie Mellon Silicon Valley | NASA Research Park, Bldg. 23 (MS 23-11) · Moffett Field, CA