Changes between Version 1 and Version 2 of ForeignFunctionInterface


Ignore:
Timestamp:
Nov 30, 2005 11:53:10 PM (8 years ago)
Author:
ross@…
Comment:

Delenda est Carthago

Legend:

Unmodified
Added
Removed
Modified
  • ForeignFunctionInterface

    v1 v2  
    1212== Pros == 
    1313 * Widely accepted and used addendum. 
     14 * Provides an essential facility. 
    1415 
    1516== Cons == 
    16  * Capable of introducing impurity into pure functions 
     17 * Some feel that the inclusion of `unsafePerformIO` sends the wrong signal. 
     18    * It is true that giving inaccurate `foreign import`s can invalidate all guarantees given by Haskell, including providing a way to define `unsafePerformIO`, but that doesn't mean it should be standard. 
     19    * The stated purpose of `unsafePerformIO` in the FFI (hiding marshalling and unmarshalling for otherwise pure functions) can be achieved with a `runST`-like device if the language has [wiki:Rank2Types] or [wiki:RankNTypes].