Every compiler is a code generator.
A generator of Machine code - aka Assembler.
Telling a machine what to do and let it find a way to execute the request - it's not AI.
It's rather "SELECT * FROM Customer".
May be some of you heard of that declarative language.
It's been around for quite a while.
AI would be for a machine to figure out the query, to form the task by itself.
To do what developers/BAs/PMs/CEOs, etc. do.
But if humans made a machine smart enough to figure out targets, purposes, then there is no guarantee it will figure out humans' purposes, not the one of its own.
In the end of the day, AI is about making a machine to operate as a human.
If successful - it will make another set of human like minds,
Trying to make them follow our orders - well, there is a name for it - slavery.
We've been there as a society, and moved out of there.
Replacing a developer using an organic bio-computer (aka brain) with another one using a synthetic one (probably bio one as well) won't change a lot.
Don't you think?