[Haskell-cafe] Project postmortem II /Haskell vs. Erlang/

Dylan Thurston dthurston at barnard.edu
Tue Jan 3 21:09:18 EST 2006

On Sun, Jan 01, 2006 at 11:12:31PM +0000, Joel Reymont wrote:
> Simon,
> Please see this post for an extended reply:
> http://wagerlabs.com/articles/2006/01/01/haskell-vs-erlang-reloaded

Looking at this code, I wonder if there are better ways to express
what you really want using static typing.  To wit, with records, you
give an example

data Pot = Pot
     pProfit :: !Word64,
     pAmounts :: ![Word64] -- Word16/
    } deriving (Show, Typeable)

mkPot :: Pot
mkPot =
     pProfit = 333,
     pAmounts = []

and complain about "having to explain to the customer how xyFoo is
really different from zFoo when they really mean the same thing".  I
wonder: if they really are the same thing, is there a way to get the
data types to faithfully reflect that?  Can you post a few more
snippets of your data structures?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20060103/634e0091/attachment.bin

More information about the Haskell-Cafe mailing list