13 ms·
> I like the idea of a framework built using a compiled language[.] Check out yesod (www.yesodweb.com). > I imagine it'd be far easier to write a vulnerable a
by dllthomas 14y ago
> I like the idea of a framework built using a compiled language[.]
Check out yesod (www.yesodweb.com).
> I imagine it'd be far easier to write a vulnerable application.
In C++, probably, yes. In Haskell, not so much.
- kintamanimatt 14y agoWhy is that? I know nothing about Haskell.
- dllthomas 14y agoMore rigid static type safety, mostly. Haskell doesn't allow you to accidentally cast something to the wrong pointer, or accidentally index off the end of an array, or similar things to which C++ is vulnerable but which modern interpreted languages protect you against. Meanwhile, Haskell's sophisticated type system lets you enforce rules that help make sure you don't accidentally pass an unescaped string to your database or user's browser, which kinds of errors are rife in even those sites developed in interpreted languages. Yesod leverages this extensively. On reflection, I think C++'s templates may be powerful enough to let you do similar, really, but 1) it is likely to be incredibly verbose, 2) you are still potentially vulnerable to the pointer or buffer related errors mentioned above, and 3) in my experience people don't generally write C++ that way - it'll be interesting to see what they've done here, though.