3 ms·
It's not hard at all. The target programming language has a well-defined grammar that says which special characters need to be escaped in strings, and a mechani
by mgaunard 5y ago
It's not hard at all. The target programming language has a well-defined grammar that says which special characters need to be escaped in strings, and a mechanism to do so, be that in the case of SQL, sh or printf formatters.
Not doing it is just plain incompetence.
- tsimionescu 5y agoIt's only easy if you want to escape everything. If there is any intention to mix escaped and unescaped text, it becomes much more difficult.
- mgaunard 5y agoNo it isn't. You just need to formally specify what you want to happen, then reason as to whether this leads to adequate semantics for the component being built, and iterate until satisfactory semantics are achieved. This just happens to be the definition of programming.