Andrei:

Thank you for your answers. Learning to use Phobos algorithms very well takes 
months.

>You have edit distance that laughs Haskell's out the door,<

The edit distance code in Phobos2 is about 129 lines long (without comments and 
blank lines), while that Haskell version I've shown is 3 lines long and it was 
never designed to be library code. Probably there are ways to write a longer 
Haskell version of the edit distance that's no more than about two times slower 
than any D version.
On the other hand the dlibs1 library version of the edit distance I've shown is 
about 10 times faster than the Phobos2 edit distance for that benchmark (but 
it's less flexible, it doesn't deal with UTF8/16) (and I've seen less troubles 
with memory allocation too).

I have closed enhancement request 5510, keeping zombie enhancement requests 
open is bad :-)


> More like it spurs the language to allow better local instantiation.

I think you refer to a recent nice enhancement request. But I am not sure 
that's enough to regain the dynamism of run-time function pointers.

Bye,
bearophile

Reply via email to