Alexander Ioffe

Senior Software Engineer @ Nasdaq

When it comes to languages, Java was my first competency but Scala was my first love. Like many developers before me, I came to the light of functional programming not through wisdom and foresight, but through the misery of malfunctioning ORM systems, incomprehensible side-effects, and horribly organized databases. Three products and five years later, I still consider myself a student and there is so much more to learn! One test of a good system is usefulness in the business world. Bringing Quill, my favorite language-integrated query framework into the myriad complexities of Nasdaq’s data model has been one of the most thrilling tasks that I have ever undertaken. Now as the lead maintainer of the framework I am setting my sights on the next major leap: Dotty!

Quill in Dotty Meta: Charging into the Deep Dark Woods with a Shiny New Chainsaw

The Dotty Metaprogramming system represents nothing less than a radical rethinking of how to design and write macros… but don’t panic and run for the hills yet! Dotty Metaprogramming is much, much better then what we have now. Using Dotty, writing macros is safer, saner, and more user friendly. This is because it is stricter, much, much stricter. These new stringencies, most notably Phase-Consistency allow a developer to not have to worry about the many ways they can botch a term-tree while splicing it back into application-code. This also means that once rewritten in Dotty, Quill will be simpler, more extensible, and substantially easier to harden, but it also means more functionality!

One immensely powerful new feature that Dotty introduces is the ‘inline’ keyword, Dotty-Quill is engineered on top of this. Using ‘inline’, Quill will have myriad new capabilities including sharing code between Quill quotes and other Scala subroutines, building Quill queries recursively, building Quill queries from type-level expressions, and easily customizing the parser itself! This translates into many new business use-cases that are presently impossible to do in a compile-time query generation system.

Join me to find out the new landscape of possibilities!