Appendix G. Polyglot development
As you’ve seen throughout the book, DSLs are not limited by a single programming language. You can use the language that best fits your requirements. Even though it seems that this means that your application will become a nest of chaos between indiscriminate islands of language cacophony, that doesn’t have to be the case. But how will you know when your project has entered such an unfortunate state? Simple! You’ll feel like the confused programmer in figure G.1.
In this appendix, you’ll see how to bootstrap yourself into a disciplined polyglot development environment. I assume that you’ll be developing DSL-based applications on the JVM. In such developments, Java can play the role of the base host language where your main application is developed using Java, and you’re developing DSLs in some other language to make your published APIs expressive to your clients. Just a friendly reminder—this appendix is only for entry-level users planning to start developing DSLs using a mixed-language paradigm. If you’re already experienced in such development patterns, feel free to skip this appendix.