My experience making an on-disk merge sort using ranges
Chris Cain
clcain at uncg.edu
Tue Feb 26 23:09:08 PST 2013
On Wednesday, 27 February 2013 at 05:23:39 UTC, H. S. Teoh wrote:
> <rave>
> If only the naysayers knew how cool Phobos will be once we
> clean it up
> and polish it into the high-quality product that it should be.
> It's
> already showing its coolness right now by being able to do [...]
> </rave>
To add on to your rave & anecdote:
I used D in a class last year which was centered around solving
various problems using programming. We were allowed to use
(essentially) any language we wanted, so I thought I'd learn D by
solving the problems. There were a few extra challenges along the
way (such as who has the fastest solution to a problem) that
really allowed me to flex some of D's muscles. Needless to say,
by the end of the class, everyone came to know that D enables
essentially all of the problems solved in (close to) the most
efficient way easily because of its overall design and its
standard library.
Usually I was either 1st or 2nd in speed of my solutions which
were often only beaten by some crazy smart dude writing pure C
code whose solutions were neigh incomprehensible. It became a
running joke that whenever anyone asked "how did you solve this
using only x" someone would interrupt me with "Because it's D."
The highly efficient slicing mechanics of D's arrays are one of
the huge reasons for so many wins.
Honestly, if I took the class again with the knowledge I've
gained with D over the last six months of me using it
occasionally (and with the massive improvements made to it since
the class), I'm certain that I could do things much, much better.
Many of the problems we solved would be easy enough to solve in
10-15 readable lines of code using ranges and the standard
library.
More information about the Digitalmars-d
mailing list