[Haskell-cafe] Re: Microsoft's Singularity Project and Haskell
thomas.dubuisson at gmail.com
Sat Jul 31 23:32:49 EDT 2010
On Sat, Jul 31, 2010 at 8:27 PM, wren ng thornton <wren at freegeek.org> wrote:
> Thomas DuBuisson wrote:
>>> And note that we wouldn't need unsafePerformIO for the FFI if all
>>> programs were made in Haskell ;).
>> Perhaps that's true, though entirely unrealistic, in the application
>> world. In the OS world you need access to machine registers and
>> special instructions (CR3 anyone? CP15?) which isn't built into any
>> language save assembly - for these FFI will always come in handy.
>> Also, Haskell continues to have an unfortunate lack of primitives
>> suitable for casting types (ex: zero copy form a bytestring like
>> entity to Word32s). In this realm FFI can outperform cleaner looking
>> code that must rely on individual byte reads.
> The FFI doesn't always require unsafePerformIO,
True. I mis-read the previous e-mail as "we wouldn't need
unsafePerformIO OR (vs for) the FFI " so please ignore that response
to a non-existent statement!
More information about the Haskell-Cafe