On 2010-06-20, Matthias Kilian <k...@outback.escape.de> wrote:
> On Sun, Jun 20, 2010 at 09:06:14AM -0500, Marco Peereboom wrote:
>> > And now let's start a flame war about weak vs. strong typing, and
>> > a second one about lazy (non-strict) vs. strict evaluation.
>> 
>> I'll play :-)
>> 
>> C has the right semantics for operating system code.
>
> Noone said that something like lisp or haskell would be good for
> that task.
>
>> The rest is magic.
>
> For operating system code, yes. But for some stuff -- I mean
> real-world stuff like web applications -- languages like haskell
> or even lisp are probably more appropriate than C (and Haskell,
> Lisp and C are more appropriate than Java or PHP).

Well yes, I once wrote a basic blog in Haskell using an sqlite db and
the StringTemplate library. It was under 200 LOC including comments, and
things like sql injections and stuff are more or less rendered
impossible by strong static typing and you are forced to do explicit
error handling.
So Haskell enforces things that are common in OpenBSD code and since the
day I learnt Haskell these things have become natural to me in C, too.
For example I couldn't imagine coding in C without doing error checks
everywhere and I can't imagine doing arithmetics with opaque data types
like time_t.
Of course Haskell does not make it impossible to write dirty code with
lots of bugs but it makes it very difficult.

Best regards,
Jona

-- 
Worse is better
    Richard P. Gabriel

Reply via email to