www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Tutorial on D ranges now on reddit

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Just posted it: 
http://www.reddit.com/r/programming/comments/ozzgn/tutorial_on_d_ranges/

Andrei
Jan 27 2012
parent reply deadalnix <deadalnix gmail.com> writes:
Le 28/01/2012 03:08, Andrei Alexandrescu a écrit :
 Just posted it:
 http://www.reddit.com/r/programming/comments/ozzgn/tutorial_on_d_ranges/

 Andrei
In this tutorial, save is not a property. I see a lot of code where it is. I do think that save shouldn't be a property, but it would be very interesting if a clear guideline was written on that point. If We put that remark aside, this is a great tutorial ! This is exactly the type of docuement we need to promote D and help newcomers. If we succed in getting more of this, we probably would be able to conquier the world soon.
Jan 27 2012
parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Saturday, January 28, 2012 04:05:53 deadalnix wrote:
 Le 28/01/2012 03:08, Andrei Alexandrescu a =C3=A9crit :
 Just posted it:
 http://www.reddit.com/r/programming/comments/ozzgn/tutorial_on_d_ra=
nges/
=20
 Andrei
=20 In this tutorial, save is not a property. I see a lot of code where i=
t is.
=20
 I do think that save shouldn't be a property, but it would be very
 interesting if a clear guideline was written on that point.
No guide needed. It must be a property, or it won't compile with -prope= rty.=20 The fact that properties haven't been being enforced is what's making i= t so=20 that people are mistakenly not making save a property. As soon as -prop= erty=20 becomes the normal compiler behavior, anything that has save as a funct= ion=20 rather than a property won't compile. - Jonathan M Davis
Jan 27 2012
parent deadalnix <deadalnix gmail.com> writes:
Le 28/01/2012 04:10, Jonathan M Davis a écrit :
 On Saturday, January 28, 2012 04:05:53 deadalnix wrote:
 Le 28/01/2012 03:08, Andrei Alexandrescu a écrit :
 Just posted it:
 http://www.reddit.com/r/programming/comments/ozzgn/tutorial_on_d_ranges/

 Andrei
In this tutorial, save is not a property. I see a lot of code where it is. I do think that save shouldn't be a property, but it would be very interesting if a clear guideline was written on that point.
No guide needed. It must be a property, or it won't compile with -property. The fact that properties haven't been being enforced is what's making it so that people are mistakenly not making save a property. As soon as -property becomes the normal compiler behavior, anything that has save as a function rather than a property won't compile. - Jonathan M Davis
So this tutorial has to be corrected.
Jan 28 2012