Record of STRefs better than STRef to a Record?

Eray Ozkural
Fri, 27 Dec 2002 09:56:04 +0200

On Thursday 14 November 2002 01:29 am, Jorge Adriano wrote:
> In some functions I might need only some pure fields, and none of the
> STRefs, but since I pass something of type 'E s' around, everything ends up
> beeing monadic. Is using two records (on with STRefs and one with pure
> fields) the only/best way to avoid this?
> I would like to use two records, doesn't seem natural, but I also don't
> like to end up using monadic functions when they are, in fact, pure...

Good question. In all Haskell codes I wrote, I ended up writing a lot of 
monadic functions which seemed to be unavoidable. Then you look at the code 
as it feels too much like an imperative code and start wondering why you are 
using a functional language :)

Happy new year to all Haskellers by the way.


Eray Ozkural <>
Software Engineer, BICOM Inc.
GPG public key fingerprint: 360C 852F 88B0 A745 F31B  EA0F 7C07 AE16 874D 539C