On 4/12/12 4:57 PM, Martin Nowak wrote:
On Thu, 12 Apr 2012 15:46:49 +0200, Jakob Ovrum <jakobov...@gmail.com>
wrote:

This video went up a while ago. I would like to comment on it, but I
didn't see any thread about it, so here it is.

Three Unlikely Successful Features of D

http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D?format=html5


Thanks to Andrei Alexandrescu for this great presentation! Although
I'm judging by the video alone, I feel you captivated the crowd quite
well with this one :)

The generalized palindrome doesn't work with odd lengths.
simple fix:

bool palindrome(Range)(Range range) {
for (; !range.empty; range.popFront(), range.empty || range.popBack()) {
if (range.front != range.back)
return false;
}
return true;
}

Wrote a comment:

http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D

Thanks for the fix!


Andrei

Reply via email to