<div><div class="gmail_quote">On Wed, Mar 9, 2011 at 6:21 PM, Yves Parès <span dir="ltr"><<a href="mailto:limestrael@gmail.com">limestrael@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Well, I want to hide the fact that I'm using ST, so if I can hide the existential type 's' it is better.<br></blockquote><div class="gmail_quote"><br></div>In practice if you want to actually _use_ ST you'll find you'll need to let the world escape into your type. Otherwise you won't be able to create and pass around any STRefs or arrays and use them later. The universal quantification inside of MyST's definition will keep you from holding on to them.<div>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">BTW, does someone know why the ST default implementation (the one exposed by <a href="http://Control.Monad.ST" target="_blank">Control.Monad.ST</a>) is strict, whereas those of State et Writer are lazy?<br>
</blockquote><div><br></div><div>Mostly because of the principle of least surprise. It makes it act more like IO.</div><div><br></div><div>-Edward</div><div><br></div></div></div>