On Wednesday, 30 September 2015 at 16:06:59 UTC, Joakim wrote:
On Wednesday, 30 September 2015 at 01:45:49 UTC, deadalnix
wrote:
https://www.youtube.com/watch?v=mFUXNMfaciE
From
http://wiki.dlang.org/Component_programming_with_ranges
Congrat H. S. Teoh
Thanks for the link, I watched the whole video today and it was
a very good presentation by Niebler. He mentions D and Teoh's
example right at the top and gets an ovation at the 49
minute-mark, once he's gone through his entire C++ version of
Teoh's D example.
Interesting that they're using the pipe symbol for chaining,
more explicitly mimicking the unix command line. The fact that
scoping meant that views and actions were explicitly labeled
could be a nice benefit, though I generally dislike such
verbosity normally. It is amazing how noisy some of the
implementation code with templates is in C++: I felt like I was
looking at some Haskell variant compared to how clean D would
look for the same code.
Another thing I noticed that showed D nice-ness is when he was
converting the weeks ranges to a string, the flow of the
functions went from the bottom up (he specifically said "start
from the bottom").
It looks so weird to me after using UFCS for so long.