[Haskell-cafe] Learning Haskell

Bulat Ziganshin bulatz at HotPOP.com
Tue Dec 6 08:43:33 EST 2005

Hello Jimmie,

Tuesday, December 06, 2005, 9:14:37 AM, you wrote:

JH> I would like to thank all who have replied to my inquiry.

my two cents :)

i'm not mathematician, but instead a professional programmer. i found
that Haskell allow to write shorter, concise and robust programs. as
Wirth says, "program = datastructures plus algorithms" and Haskell is
excellent at expressing both data types and algorithms processing them

the larger the project, the there is more meaning to use Haskell to
implement it, because you get the possibility to construct language
"dialect" which is better suits pecularities of this concrete project.
just for example - even control structures i use in my program are
written by me (and it is implemented very easy, just several lines each)

but for the small projects real difference created not by general
language features, but by features and environment, oriented toward
this concrete field of application. and in area of scripting and web
programming perl/ruby/python have much more specialization

one time i tried to write Haskell and Ruby variants of small script that
runs programs and bencmark its results. the main part of program was
equally sized, but Haskell implementation required from me writing
some small library of functions which are already present in all
abovementioned languages - getFileSize, trimSpaces and so on

so, for small scripting tasks you will not get benefits unless you are
need to organize complex dataprocessing. and even to make par-to-par
comparision with scripting languages, you are need to obtain libraries
for RegEx matching, String processing, and filesystem operations

i think, that the same applies to web programming - you need an
additional libraries and even with them you will not get all benefits
of Zope and RubyOnRails

so, in my feel, Haskell is better in areas where there is no standard
quick-and-dirty solutions and all languages are in equal conditions,
but it can't compete with Visual Basic in user interfaces, Erlang in
distributed processing, and Python in scripting

JH> I've seen much of what OO provides, good and bad. I'm interested in a
JH> good FP experience and it seems that Haskell can provide that.

nevertheless, if you not only search for the faster way to create
these scripts, but also to improve your programming skills, i
recommend you to teach Haskell :)  i even recommend you to spend just
one day to read book about Python (or Ruby, which i love more :) just
to get taste, and then go to teach Haskell seriously. these scripting
languages are not very complex, nor very different from other languages.
and in big contrast with Perl, they contains very little number of
"special rules". so, reading the whole book about Python/Ruby in just
one day is entirely possible

to learn Haskell and run scripts i recommend to use Hugs (WinHugs to
learn, if you are under Windows). my CMD instructed to run .hs files
with "runhugs.exe +st.qkoOuI -98"

i learned Haskell by "gentle introduction" but afair it had bad
explanation of imperative programming in Haskell. if your book have a
bad explanation of I/O in Haskell, try another book, or ask here. this
area really not seriously more complicated than in other languages,
despite its complex (but completelly hidden!) theoretical basis

JH> Thanks again. We'll see if I can fit Haskell into my brain. Or at least
JH> a sufficiently workable portion. :)

to my taste, Haskell have the features from ususal languages (say,
Java or Ruby) plus something more in areas of defining datastructures
and algorithms. if you don't need to use more features in these areas
than traditional languages provide, then there is no great meaning to
learn Haskell

Best regards,
 Bulat                            mailto:bulatz at HotPOP.com

More information about the Haskell-Cafe mailing list