News for hackers. Stuff that matters.
Re:Ask HN: What are the best API generators you know? by mbrodersen on Wednesday August 31, 2022 @09:11PM (#32670521)
I introduced a code generator at work and it was quickly adapted and modified/upgraded by colleagues. It started out as a simple protocol generator (think Google buffers but 5 years before Google buffers became a thing) and was then expanded over the years by a number of people to handle a lot more (databases, model specifications etc.) generating C++, CMake, Typescript, Java, and C# code. There is no open source generator out there that can handle all the things this tool does. It has now become the first thing people install when starting new projects. I think the key to its success is that the code generator itself is really simple. So you can figure out how to improve it in no time. Also, the generated code is super pretty. It even includes comments explaining what the generated code does. This was a design choice by me to ensure that people trusted the generated code. Without it I don’t think the generator would have been successful. If people can’t understand the generated code then they don’t trust it and is less likely to use the generator.

There are no comments on this comment yet.