At 2000-11-27 19:52, Tyson Dowd wrote:

>On 27-Nov-2000, Adrian Hey <[EMAIL PROTECTED]> wrote:
>> On Mon 27 Nov, Fergus Henderson wrote:
>> >  Do you think that Haskell would be better without `unsafePerformIO'?
>> 
>> Well, a sceptic like me is bound to wonder why such a non-function is
>> provided in a purely functional language. What really worries me is
>> that the damage isn't localised. If you allow such things you can never be
>> sure that any function really is a function, without careful scrutiny of all
>> the code it's dependent on.
>
>This is an issue, but it arises in any "pure" language with a foreign
>language interface.  

Not necessarily, the functions just need to be typed correctly. In the 
case of a non-safe or  imperative function, that's going to be of the 
form "a -> IO b" (or "IO a -> IO b" if you prefer the more powerful arrow 
model).

No safety needs to be sacrificed.

-- 
Ashley Yakeley, Seattle WA


_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to