Re:Don’t try to sanitize input – escape output
by chopin on Thursday February 27, 2020 @07:13AM
(#22432573)
>the developers will at some point reach for the deprecated api
Agreed, however you can have organizational measures to prevent this (a build time check). And of course a change in the framework must be accompanied by decent conversion libraries (I don't think this is different in Haskell).
I think if you don't have an easy way of creating string literals in the type you want, the developers will at some point reach for the deprecated api, and at that point you're just requiring good hygiene. Which is exactly what you're trying to stop. Language support is critical in being able to get away with this.