Hello, I’m thinking of using Kotlin as a code gene...
# announcements
m
Hello, I’m thinking of using Kotlin as a code generation tool for different languages (currently aiming on php and golang). I believe it should be possible, there are already backends for JS and Native. I was wandering if there is any specification/documentation about compiler backends or someone could guide me to better understanding how to start exploring current implementations?
t
OOI would openapi not work for your usecase?
m
Hello. Might work, could you please point out to the API you’re talking about?
t
openapi is a code generation ecosystem, google it and see if it will do what you want
m
t
yep
m
Thanks. I was thinking of “com.intellij.openapi” 🙂 Right, it looks like a good thing but a little bit different. I would like to not just generate stubs but code which should be executed on a native language. The closest thing is Haxe but our main language is Kotlin and I wanted to stick with it if possible…
t
You can generate that too - that’s exactly what I use it for
m
I mean, i’m interesting in rather implementation than API, i.e. write an encoding algorithm and then use it… Ideally, that should be any sort of code. Can I do that with OpenAPI?
t
you can do pretty much whatever you want
m
Sounds interesting… What’s the input language? Maybe you have some example? I’m glancing the site and see nothing but “API” specification so far…
t
actually, maybe it’s not really suited to what you want as you’re not talking about operations
could still be worth looking at a templating language though