I doubt an AI could be trained to do that. Anything that cannot be transpiled mechanically probably requires a human decision which will involve analysis and tradeoffs between objectives that the AI could not know about.
With enough work, anything a human does can be automated. Unless you believe human brain does something non-computable (like e.g. Godel), which makes you a dualist which comes with its own philosophical baggage (how do different types of ontologies interact?).
Sure, the machine could "make a call" and pick a way of doing things, but that machine wouldn't be the one supporting the resulting code for years afterward. Past a certain point, some technical decisions become value judgements because of their impact on humans.
One need not delve into philosophy to observe that, in practice, humans can do many things that we have yet to make machines do successfully. I admit that this is like solving the halting problem by saying "yes" (https://xkcd.com/1266/), for better and worse.
(But seriously, I think it's fair to say "as of 2022, no, AI can't do that")
No seriously, AI will take years to understand the context.
Coding is more about capturing real world knowledge into a functional program. It involves so much learning about how to translate processes, workflow and regulations into a binary that it seems naive to have an AI code generation tool we even can't understand.
They even had to come up with their own security scanner (https://scan.nextcloud.com/). I assume because they don't even trust their own code mess or cause you can f-up your PHP conf in so many ways that your server becomes vulnerable.
All the advancements on PHP are great, it's becoming a JAVA more and more, but likely any PHP legacy apps will never see an upgrade to the latest version. And starting a new project in PHP, nah, there are better more well designed programming languages.
>> there is a huge market and billions to be made in this industry.
What canada has found is that this giant market is illusionary. Overall cannabis use has not increased after legalization. The same amount of money is being spent now as before. Yes, there is a slight tax income, but the reality is that people are getting it from the same people they used to. Everyone buys from friends and family just as before. So the government, and all those investors, are not seeing the predicted profits.
"the reality is that people are getting it from the same people they used to"
I've read that the Canadian government mandated that legal cannabis be limited in potency, so that in order to get high potency cannabis people are forced to go to the black market.
Could such potency limits be what's keeping the Canadian black market alive?
No idea. Never been in the market myself. I do hear that the commercial stuff is too expensive. And why pay full price for a plant, a weed, you can grow in a closet? Everyone just knows someone who grows more than they can use themselves. They then sell it to friends for next to nothing.
That's great news and will contribute further to Rusts' adoption.
Large codebases will be able to transcode to language X at some point in the future and I am waiting for the day when it can be done for Rust with projects like https://github.com/facebookresearch/TransCoder/
Has anybody incorporated an AI into c2rust to do the heavy lifting and learning from the compiler errors to self fix the transpiled code?