This type of solution has obvious upside. The truth is that it has been tried many times before (Flash, Frontpage, Adobe Muse). The hard thing here is to being adopted both by the designers who start the process and at the same time generate code that developers will agree to work with.
The way we tackle this is by giving designers tools to express what they want in ways that were not available before, and then use the output to generate code. For example, one popular feature is Stacks[1] which is basically CSS Flexbox for Sketch. When designers use Stacks, we can then use that data and generate an actual CSS Flexbox from it.
Designers are adopting this approach but in terms of code generation, we still have a lot of room for improvement. The code works great, but it's not always optimal in the way that a good human developer would write it.
We have an internal goal, which is to pass the "Turing Test", where a developer will not be able to recognize whether our algorithms or by a fellow human developer.
[1] https://medium.com/sketch-app-sources/auto-layout-introducin...