3 ms·
About your point 3), it's worth noting the "toHtml" call buried in that example. Haskell is both strongly and statically typed. That type boundary between stri
by cscheid 13y ago
About your point 3), it's worth noting the "toHtml" call buried in that example.
Haskell is both strongly and statically typed. That type boundary between strings and HTML output is enforced by the compiler, and it automatically (and provably!) prevents a metric crapload of injection attacks.
- deleted 13y ago[deleted]
- tel 13y agoTo bring this into sharper detail, notice that there's the "OverloadedStrings" compiler directive at the top of the file. That means that "hello " and "!" are of type Html, different from String. Strings can only be concatenated with Html after they've been escaped. For more elaboration, see 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...