[Haskell-cafe] Re: [Haskell] pros and cons of static typing and
side effects ?
Mark Carroll
markc at chiark.greenend.org.uk
Thu Aug 11 07:43:48 EDT 2005
The previous comments make sense to me. The lots-of-unit-tests aspect of
static typing I find really useful, far exceeding any BDSM cost. If I'm
engaging in exploratory programming, the type inference combined with the
ability to write 'error "armadillo"' in stubs for values I can't be
bothered to generate right now really works conveniently for me.
Although I agree that lots-of-lists is very handy in early prototyping, I
don't feel at all constrained by using homogeneous lists, although very
occasionally I may use existential types, and the way I write programmes
is exactly to think in advance and then write the code: to do otherwise
just wastes my time because then the code doesn't work in some confusing
way and I have to do that thinking I postponed to figure out why - or, if
it does work, I have to think about it to satisfy myself that appearances
aren't deceiving.
I'm not quite sure what macros would look like in Haskell, but I've not
missed those either. In Lisp I would tend to use them for things that
involved changing the values of variables, but that's not really a
Haskellish thing to be doing anyway. Mind you, I learned Lisp after
learning ML, so to some extent I was thinking in ML when writing in Lisp.
Alas, dead-tree versions of "On Lisp" are hard to come by affordably, but
I am now trying to learn more about what I might have missed about Lisp.
I find monads useful because I find it a helpful debugging aid for
functions to be quite clear about what side effects they may want to
have.
I posted this to Haskell-Cafe instead of the main Haskell list, because
I'm rambling a bit. Puzzled Haskell-Cafe readers may like to check
http://www.mail-archive.com/haskell@haskell.org/msg17009.html
-- Mark
More information about the Haskell-Cafe
mailing list