Can Natural Language Processing Bring Back the Excitement to Domain Specific Languages?
Domain specific languages(DSL) have been one of the most over-hyped and under-delivered tech trends in the last few years. While DSLs hve lost a lot of relevance as a general-purpose technology trend, they might be able to catch a second wave drive by the evolution of artificial intelligence(AI) and natural language processing(NLP).
A few years ago, DSLs were called to become one of the most important technology trends of the next decade. Dozens of books and even conferences were created to preach the gospel of DSLs. Similarly, developers leveraged the syntactic extensibility of dynamic language such as Ruby or Python to create numerous DSL frameworks that became somewhat popular. However, after a few years, DSLs seem to have lost their initial momentum.
What Caused the Decline of DSLs?
Let me clear, I believe DSLs remain a super-important concept in model software development. However, the technological manifestation of DSLs is what I believe has lost its initial appeal. There are several factors that have contributed to the decline of DSL technologies:
— DSLs are for Geeks: Not exactly but that was the position adopted by main mainstream information workers. Intuitively, people associate programming languages with difficult tasks reserved for geeks with deep analytical skills. As a result, many people rejected the idea of embracing DSLs for their daily work.
— Poorly Designed Languages: Designing languages is hard and typically requires a deep computer science foundation. The rush around DSLs caused the creation of many poorly-designed DSLs that ran into a lot of challenges when applied in the real world.
— DSL Designers Were Not Users: Most DSLs in the market were designed by programming language experts which were not using their creation on a daily basics. This approach contrasts with, for instance, general purpose programming languages on which designers age their own users. That level of friction between designers and users ended up producing many DSLs that were disconnected from its practical applications.
Can NLP Resurrect DSLs?
Natural language, is, in many ways, a more effective and more natural vehicle to create DSLs. The evolution of AI and NLP can bring a new phase of DSL technologies that addresses many of the limitation of the previous generation. The are several benefits of leveraging NLP as the foundation of DSLs:
— Intuitive Rules: Most DSLs are not more than sophisticated sets of logic rules. That type of rule-sets can be seamlessly modeled using NLP constructs .
— Voice and Text Interfaces: NLP can enable the creation of DSLs using both voice and text which can improve the mainstream adoption of the language.
— Syntax-Agnostic Extensibility: NLP-powered DSLs are naturally extensible without requiring new syntactical elements. For instance, adding a new verb or phrase to a DSL does not require to modify the language or to retrain users.
— Tooling: NLP platforms such as Wit.ai, LUIS or Api.ai provide highly sophisticated toolsets that can be used to streamline the authoring and maintenance of DSLs.
— Rich Grammars: NLP-designed DSLs can leverage grammars that are drastically more and intuitive than traditional DSLs.