On Mon, Jan 21, 2013 at 11:28:21AM -0800, Walter Bright wrote: > On 1/21/2013 8:12 AM, H. S. Teoh wrote: > >Before D, I never wanted to write unittests. They were cumbersome, > >required diversion from the task at hand, consumed extra effort, and > >were troublesome to remember to run separately every time you make > >some changes. > > > >D's unittest blocks singlehandedly converted me. :) > > One of the fascinating things I learned with D are that making > things even slightly easier to use can have large, transformative > consequences.
It's the butterfly effect in programming. > 3 cases: > > 1. unittests (as you mentioned) > 2. ddoc > 3. new lambda syntax I have to admit that ddoc hasn't really done it for me (yet). I think the impediment is that the default output needs some work (mainly in CSS and indexing) before it is useful as actual documentation. But yes, the new lambda syntax makes them a joy to work with. Ultimately, delegates are just syntactic sugar for defining, declaring, and using a functor class containing some context variables (which is what one has to do in C++), but being able to omit most of that boilerplate makes a huge difference in their usability (and readability!). T -- Ph.D. = Permanent head Damage
