NEW ATLAS NEEDS YOUR SUPPORT
Upgrade to a Plus subscription today, and read the site without ads.
It's just US$19 a year.UPGRADE NOW
Avoiding security problems with the code embedding and translating that these often-complex queries entail takes a lot of care, expertise, and testing, but a special language like Wyvern could take the pain away. It understands and identifies these sublanguages by context and treats data and objects accordingly as literals (fixed values) of a given type in a language appropriate to that type (so to further the example above, an SQLQuery type literal will be dealt with in SQL code rather than as a string of text that needs to be parsed by a special function).
"Wyvern is like a skilled international negotiator who can smoothly switch between languages to get a whole team of people to work together," associate professor Jonathan Aldrich says. "Such a person can be extremely effective and, likewise, I think our new approach can have a big impact on building software systems."
Wyvern is not the only project to tackle the issue of meta-programming and code parsing across languages – others include ProteaJ, Scheme, OJ, and Spoofax, which approach the problem from different angles – but its creators believe Wyvern offers the best balance between composability and expressiveness such that it enables a broad range of embedded languages to be used more or less freely.
It's not yet ready for the prime time, though. Wyvern is at this stage only implemented at a basic level, with many features not fully developed or enforced. Budding contributors or experimenters can dive in at the project's GitHub page, however.