Towards Slangs and DSLs - Matthew Stuckwisch

Опубликовано: 03 Ноябрь 2024
на канале: The Perl and Raku Conference - Greenville, SC 2025
546
14

#perl #tprc #slangs #DSLs #gpls

Have you wanted to create your own DSL? Or do you have your own favorite DSL? A DSL in Raku can be something as simple as letting you expression a literal in a more compact manner or as complex as an entire language. Learn how to not only create one, but integrate it into Raku!

Raku allows users to integrate slangs, or sublanguages that modify the syntax. This can be used in a number of ways, but one is to integrate simple DSLs, or add new syntax features. This talk discusses the ways to currently integrate DSLs by way of modifying Raku’s core grammar and actions. This is something that will be much easier down the road as RakuAST becomes a bit more polished, but is easy enough for most use cases with the current Raku compiler. Appropriate caveats will be noted when things aren’t as future proofed (but also discuss what the future-proofed version will be).