[Haskell-cafe] What's the deal with Clean?
leimy2k at gmail.com
Tue Nov 3 18:42:24 EST 2009
On Tue, Nov 3, 2009 at 2:16 PM, Tracy Wadleigh <tracy.wadleigh at gmail.com>wrote:
> I had to implement a ring buffer, and I wanted the code using it to be
>> written in Haskell. I ended up implementing the buffer in C, and wrapping
>> it in FFI from Haskell because implementing a destructive array in Haskell
>> is kind of unwieldy to someone of my experience level. In Clean, it looks
>> like the uniqueness typing allows for destructive updates in a very
>> controlled manner.
> The ST monad provides this functionality. The
> never-instantiated-in-a-visible-way state parameter of the ST monad provides
> the "uniqueness" required for doing destructive updates in a pure way.
Someone suggested that to me on IRC once I'd already cranked out a C
implementation with FFI bindings. It's just too easy to use the FFI in
If we raise the barrier of FFI, more people will use ST!
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe