What are good samples for targeting MPS code generation to the Erlang language stack?
What I very dislike in Java is its unreasonably heavy requirements ever for start-up and provide some extra light services. On the other side, Erlang (+Elixir) known as a very comfortable tool for writing network services, especially in the case of small packaged processing, such as IoT applications I’m deeply interested in.
Regarding generation, you can go about it through two very different approaches:
- You can write full support for your target language (Erlang) in MPS. It means creating concepts, editors, constraints and then a text generator from Erlang in MPS to Erlang text files. You would then have a generation step in which you translate your DSL into Erlang in MPS, and then it would be transformed into Erlang text files. This approach would take quite some effort
- You can just write text generators which produce Erlang text files, without any definition of concepts for the Erlang concepts. This is much easier to get started with. Later you may want to move to the first approach but you can start with this one quite quickly