Hello!

On Fri, Jun 04, 1999 at 12:29:45PM +0200, Friedrich Dominicus wrote:
> [...]

> > What is difficult is that by using some predefined function, one can
> > express very much in very small code. I believe Haskell is even more
> > expressive than most OO languages with comparable libraries
> > (perhaps except Smalltalk, as that has also a very compact syntax).

> I havn't made my mind if that is positive of negative. Sometimes it
> remind me of Perl and I'm not a big lover from it.

Somehow that's not really fair towards Haskell. Perl is made up
of many special cases, and in some other places, you have to use
major hackery to achieve some goal (mind the "OO" part of Perl,
for just one example).

Haskell has a very small, rather regular core syntax, with a bit
of syntactical sugar on top (type classes [translated to
records of "methods"], list comprehensions, monadic do-expressions),
but that syntax allows to define rather high level functions
*in Haskell itself* (see the Hugs prelude for the definitions and
see that very few of those definitions are actually references to
primitives, for example), and usually with very clean definitions
(though the GHC prelude implementation sometimes uses hacks to
get more efficient implementations).

> > Another difficulty is monadic I/O. Perhaps you should exercise
> > programming with standard higher-order functions without I/O
> > a bit more, so that you master that difficulty and don't have
> > to *simultaneously* understand both the HOF things and I/O.

> That might be good advice but I/O is one of the most essential things
> and I have to know how to use it proper for writing small skripts.

I think exercise with the purely functional, non-I/O core (and perhaps
interact like someone else suggested) teaches you the mode of
thinking in purely functional languages. That thinking can also
help you understand the way I/O is implemented in a referentially
transparent way.

> [...]

> This comments helped me. So I think I will put them under my pillow;-)

> Regards and thanks
> Friedrich

Regards, Hannah.


Reply via email to