Re:Automated Refactoring of a U.S. Department of Defense Mai...
by bpicolo on Tuesday May 07, 2019 @08:41AM
(#19848822)
Seems like gotos would be fairly easy to clear out in the automated refactor. Control flow feels like one of the more trivial parts of automated refactoring, because that's straightforward AST modifications?
[ Parent
| on HN ]
Re:Automated Refactoring of a U.S. Department of Defense Mai...
by stcredzero on Tuesday May 07, 2019 @02:24PM
(#19852078)
Control flow feels like one of the more trivial parts of automated refactoring, because that's straightforward AST modifications?
No. The AST part is wrong. Compilers do decompose code into basic blocks. Even the most spaghettified code decomposes into basic blocks. Any language with tail call optimization can handle the basic blocks rewritten as functions.
That won't get you to "clean" however.