[Haskell-beginners] do Haskell programs have fewer bugs?
Ryan Trinkle
ryan.trinkle at gmail.com
Wed Mar 19 18:52:32 UTC 2014
Hi Dennis,
At skedge.me, our platform is Haskell on the backend and JavaScript on the
frontend, and we've definitely found that we have far fewer bugs coming out
of the backend than the frontend. I think Haskell's language features
(including the type system and sum types, most prominently) are responsible
for much of this difference.
We've also been able to completely eliminate certain kinds of bugs, such as
accidentally performing side effects during a database transaction (which
might be rolled back), by using monads to enforce our application's layer
architecture.
It's certainly possible to write very buggy code in Haskell, but Haskell
gives you a lot of tools that you can use to prevent yourself from writing
bugs. In my experience, it is much more efficient than achieving the same
level of quality using only testing.
Ryan
On Wed, Mar 19, 2014 at 1:09 PM, Dennis Raddle <dennis.raddle at gmail.com>wrote:
> I was thinking about why it seems I can write Haskell code without bugs in
> a much easier way than imperative languages. Part of it is the strict
> type-checking, but I think there is something more. It's the potential for
> conciseness. I work hard when programming in Haskell to take advantage of
> language features that make my program concise. Somehow this leads me to
> think about it in a certain way. I know I'm on track as it gets smaller and
> smaller. And as it gets smaller, it leads me to think about my logic's
> cases and things like that. Certain patterns show up and I think about what
> those patterns mean for the structure of my problem.
>
> By the time I'm done with all that, I've analyzed my problem much more
> thoroughly than I would ever do in an imperative language.
>
> Dennis
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140319/9217d49c/attachment.html>
More information about the Beginners
mailing list