Array interface refactoring
simonmar at microsoft.com
Wed Feb 22 05:17:50 EST 2006
On 22 February 2006 09:48, Donald Bruce Stewart wrote:
> It's not a terribly serious suggestion ;)
> I just found that using unsafeRead/Write is very important for
> shootout entries (we used it a lot -- it's the only way to beat C),
> but a lot uglier on the page than (the equally dangerous) peek/poke,
> which get nice short names for some reason.
The obvious conclusion if you follow this line of reasoning is that we
should rename Foreign.* to Unsafe.Foreign.* :-)
More seriously, I think the rationale here is that if we added "unsafe"
to every part of the FFI that could possibly be used to shoot yourself
in the foot, that would be an awful lot of "unsafe"s.
More information about the Haskell-prime