How was compiling to Erlang implemented? #1317
Answered
by
lpil
lunandd
asked this question in
Questions & support
-
Basically I want my own language to compile to Erlang. How easy would it be to implement that and how was it implemented for gleam? |
Beta Was this translation helpful? Give feedback.
Answered by
lpil
Oct 29, 2021
Replies: 1 comment 2 replies
-
The current Gleam compiler outputs Erlang source files and then calls the If your compiler is written in Erlang you could also consider using compiling to core Erlang, but this may be more challenging and I'm not convinced it has any particular advantages over compiling to regular Erlang code. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
lunandd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current Gleam compiler outputs Erlang source files and then calls the
erlc
Erlang compiler on them. It works well!If your compiler is written in Erlang you could also consider using compiling to core Erlang, but this may be more challenging and I'm not convinced it has any particular advantages over compiling to regular Erlang code.