I have been working a long time to bring queries into a modern programming language. Seven years ago I looked beyond ORM and saw the next horizon, a new world where boundaries between data are blurred and popular paradigms from different disciplines combine. Many have tried to convince me that it is simply a mirage, and maybe in some respects it is, but as with anything else there is often a lot of utility born out of imperfection. I have been marching steadily toward that horizon ever since. 


I also realize much of it has been done before. From academic languages to real world database scripting engines, the concept of the query itself is nothing new. Yet, it has never been mainstream before, baked in as a first-class feature of a general purpose programming language.  It is no longer a novelty, applicable to only a single domain, each domain with its own variant, bound in shackles, caged like a dangerous animal. It is becoming something real, something you can reason about and rely on, a permanent fixture of the natural programming environment, a part of its substrate.


And I’m not just out to promote a particular language. In a few years, there won’t be a language without queries. Eventually, queries will become one of the most used tools in your toolbox. And not just for databases; all aspects of your application will be queryable to some degree, allowing you the freedom to apply set-like operations anywhere and everywhere. Queries will bring power through simplicity and abstraction. What was once proscriptive will become descriptive, pushing more and more of the gritty details down into the runtime. And still the benefit will go beyond merely your personal productivity boost. The next horizon is already in sight. Queries will eventually become runtime optimized. They will enable automatic parallelism, scaling and distributed processing.


Yet, we are not there yet. With the help of a lot of other people, I’ve only just arrived at that first horizon, a place where the mirage forms into solid shapes and the world that I only imagined becomes substantive, where I can look out across the landscape of all that was devised and see it functioning, its clockwork gears spinning, its implications twinkling like dew upon fields of freshly grown grass. And I can simply query it, all of it, the grass, the trees, anything identifiable and enumerable. And it just works.


Yet in the midst of all that, I am overcome with another thought. Another horizon has opened up in my mind and I can see a bit further, beyond the benefits and the boosts, beyond the query itself. I can see now that it was only the first stepping stone. Something much bigger is out there. A paradigm shift is coming, where all things become fluid, all boundaries dissolve and intent becomes first class.


And it has certainly all been done before.