[aklug] Haskell: Was: Re: Re: Linux/Drupal/PHP/Latest LJ

From: Christopher Howard <christopher.howard@frigidcode.com>
Date: Fri Oct 12 2012 - 02:47:54 AKDT

On 10/11/2012 10:52 PM, Arthur Corliss wrote:
> the slightest hint of reliability. Those geeks writing sites in
> Haskell aren't always just doing it because it meets some academic
> (when did learning become bad?) standard of purity; very powerful
> typing often solves very real problems in software engineering. The
> tradeoff there is that very powerful typing also makes some common
> tasks particularly difficult to implement. Some people find this
> tradeoff acceptable; many do not.
>

Let's hear it for Haskell!

Sorry, just had to chime in. Thought I was the only one on the AKLUG
list who even knew Haskell existed. :D I'm one of those nerds who is
hooked on the functional paradigm and purity, though I haven't done any
Web design with it yet. (Planning to play around with CMS soon.) But
I've got a pet video game project being developed in Haskell. (Source on
my Web site.)

Yet, one comment on the above statement: "The tradeoff there is that
very powerful typing also makes some common tasks particularly difficult
to implement." To be more precise, I would rather state that it "makes
some common task more difficult to learn." We are cutting fine hairs
here, but it is a rather significant difference. For example, (contrary
to rumor) working with global variables and memory locations is fairly
simple and straightforward in Haskell. See Data.StateVar or Data.IORef.
But of course, you must keep such activity restricted to the sphere of
the IO Monad (there's the whole functional purity thing) and learning
how to work with monads is one of the crucibles of learning Haskell. In
my personal experience: now that I'm comfortable working with the IO
Monad, I have had a fairly easy time working with the OpenAL interface,
which requires passing around state variables representing the sound
objects.

There are other things in Haskell that I know replace or improve upon
the many common conveniences you expect in the common languages, which I
am still learning about; for example, the State Monad allows you to
format a calculation as though you were working with a state-full
variable (even though you aren't).

And, of course, in the functional programming paradigm you often find
that you don't want to do things the "common" way anymore. Fascinating
things like recursive approaches, combinators, FRP, lenses, et cetera ad
infinitum.

Anyway... up-vote this post if I haven't put you to sleep yet!

-- 
frigidcode.com
indicium.us

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.

Received on Fri Oct 12 02:41:34 2012

This archive was generated by hypermail 2.1.8 : Fri Oct 12 2012 - 02:41:35 AKDT