[bitc-dev] Call by need?
wren ng thornton
wren at freegeek.org
Fri Sep 10 13:49:05 PDT 2010
On 9/10/10 3:55 PM, Pal Engstad wrote:
> On 9/10/2010 12:32 PM, wren ng thornton wrote:
>> [1] My numbers are borne out by some notorious competitions which are
>> often cited both for and against Haskell, despite how benchmarking
>> competitions pervert code far away from normal patterns:
>> http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php
>> http://shootout.alioth.debian.org/u32q/which-programming-languages-are-fastest.php
>> http://shootout.alioth.debian.org/u64/which-programming-languages-are-fastest.php
>> http://shootout.alioth.debian.org/u64q/which-programming-languages-are-fastest.php
>
> I very much doubt you would write Haskell code like that... Ptr Word8? Is it even safe?
As I said, notorious and often cited both for and against. Benchmarking
competitions generally have a way of perverting code away from natural
style, regardless of the language; and this particular competition
outlaws the use of libraries (or at least it used to; I don't follow it
closely), which is a really big problem re comparing actual code in the
wild. Haskell is a very library-oriented language and uses lots of small
libraries, more like Perl's CPAN than like C libraries.
You can use Ptr Word8 to do unsafe things, but (Ptr a) is there to deal
with FFI stuff and interacting with C is always unsafe. People certainly
use it in real code when they need to marshall things back and forth
across the FFI.
--
Live well,
~wren
More information about the bitc-dev
mailing list