3 ms·
> I see this an issue of typing Yes, this reminds me of "stringly typed programming", i.e. where the language may offer strong types, but the program just uses
by chriswarbo 9y ago
> I see this an issue of typing
Yes, this reminds me of "stringly typed programming", i.e. where the language may offer strong types, but the program just uses `String` everywhere. String injection attacks are examples of this: SQL injection can only occur if it's possible to concatenate "SQL statement" with "user input"; if these are both represented as `String` then it's easy to run into such problems; if they're represented as different types, then the only way to combine them would be with a designated conversion function, which is exactly where we can put the neccessary escaping.
See also: http://blog.moertel.com/posts/2006-10-18-a-type-based-solution-to-the-strings-problem.html http://blog.moertel.com/posts/2006-10-18-a-type-based-soluti...
- weberc2 9y agoCMake is stringly typed, and that’s only part of the reason it’s such an atrocity.