[Haskell-cafe] Haskell saves lives :)

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Mar 30 05:21:33 EST 2006

-- i think that this may be interesting for other haskellers

Hello Wolfgang,

Wednesday, March 29, 2006, 8:24:09 PM, you wrote:

>> so, the concurrent programming, may be, the only area at now, where
>> real-world, commercial programmers should prefer Haskell over all
>> other languages.

> are you a real-world, commercial programmer?  If yes, I'd like to know the


> reason(s) for you programming in Haskell.  Was it Haskell's support of
> concurrency?  Just interested…

1. i don't write commercial apps with Haskell. although it's not
entirely impossible. i've written in cafe (search for subject
"Haskell's market") that i think about this now

2. programming languages is my hobby. in my feeling the main problem with
C++ and Delphi (i don't used Java/C#) is that working with complex
datatypes is not simple and straightforward, another problem is lack
of support for anonymous code blocks (closures). even Perl beats them
in these areas!

Haskell attracted me due to the great type system, great closures
support, type inferencing, good syntax. Having the full power of
functional language to write most complex parts of code (i mean they
require most complex algorithms) is very helpful. at the same time,
for 80% of program speed is not matter, and FP/laziness again helps
here, allowing just to write faster these parts of program. in
addition, Haskell is very strong-typed language what allows to catch
much more errors at compile time. these all results in what i wrote in
less than one year program that is close in functionality to that
others wrote in C++ during several years. this program required to
write several general purpose libs and bindings to C libs, so i
enlarged HCAR's hall of fame with some new entries :)

about Concurrency - i was amazed how easy to use it. my first
experience in this area was carrying out part of algorithm to another
thread and it was implemented with just about 30-40 lines of code! i
then enclosed this technique in the module that allows to use threads
as message-processing systems - each has an "stdin", "stdout" and so
on and there are functions that can create networks of arbitrary
complexity from individual threads. again, the Haskell's type system
greatly helps me here, allowing to pass between threads structured
values of arbitrary types instead of just bytes - i can't imagine
whether i will have enough patience to express in another language
requirement that "stdout" of each thread should produce values of
exact the same type as accepted by "stdin" of next thread in the
pipe/network. again, Haskell saves lives :) - i mean that its powerful
type system and type inferencing allowed to write type-safe code in
the area where any other language would fail.

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list