In chapter 28 of Rapid Development, McConnel (2014) calls the "throwaway prototype" a software development best practice; he also warns that keeping the throwaway prototype is a classic software development mistake.
"One of the key problems in developing a throwaway prototype is that the prototype might not get thrown away."
McConnel states that "evolving the prototype into the final product" can lead to bad design, poor maintainability, and poor performance.
For prototyping code that evolves into the finished project, McConnel instead recommends "evolutionary prototyping."
McConnell, S. (2014). Rapid development: Taming wild software schedules. Redmond (Washington: Microsoft Press.