Implementing Haskell's Type-Level Quicksort in D

Philippe Sigaud philippe.sigaud at gmail.com
Fri Feb 14 11:09:43 PST 2014


On Fri, Feb 14, 2014 at 3:24 PM, bearophile <bearophileHUGS at lycos.com> wrote:
> Meta:
>
>
>> While it is heavier than Haskell's syntax, I have been consistently and
>> pleasantly surprised by how powerful D's template pattern matching is (bugs
>> notwithstanding). I wonder how well-known this is outside this mailing
>> list...

Well, I have a tutorial, but I admit it being somewhat incomplete and
now partially out of date (2012).

> I keep reading blog posts that use Haskell and present supposed "marvels",
> using very complex things, that can be routinely done in D, and with less
> complexity for the brain of the programer, often leading to faster code and
> equally safe :-) So while I like several parts of Haskell, it's sometimes
> over-hyped (while D is nearly invisible).

Same here, same here! But you have to admit some of their examples are
pretty damn elegant :)

I remember doing some Haskell -> D translation (a bit like what Meta
is doing), making it work, doing the happy-happy dance, and then
suddenly realizing I could do the same compile-time computation in one
line of D ;)


More information about the Digitalmars-d-learn mailing list