Re: Expanded source code

2009-06-19 Thread Ary Borenszweig
Paul D. Anderson wrote: Paul D. Anderson Wrote: Is there a way to see the source for a D program after the mixins and templates, etc., are expanded? I get occasional error messages saying I've got incompatible types, for example, but the error message only makes sense when I mentally

Re: [SO] Modifing local class instance in pure function

2009-06-19 Thread Steven Schveighoffer
div0 Wrote: In your example you are returning values types, not objects as in the original question. Arrays are not value types. Substitute int[] x with a pointer, same argument applies. -Steve

Re: Expanded source code

2009-06-19 Thread Paul D. Anderson
Ary Borenszweig Wrote: Paul D. Anderson wrote: Paul D. Anderson Wrote: Is there a way to see the source for a D program after the mixins and templates, etc., are expanded? I get occasional error messages saying I've got incompatible types, for example, but the error message only

max function

2009-06-19 Thread Paul D. Anderson
Okay, where is the max(a,b) function in phobos? I realize it's a dead simple template implementation but I thought it would be implemented somewhere. Paul

Re: max function

2009-06-19 Thread Jarrett Billingsley
On Fri, Jun 19, 2009 at 5:05 PM, Paul D. Andersonpaul.d.removethis.ander...@comcast.andthis.net wrote: Okay, where is the max(a,b) function in phobos? I realize it's a dead simple template implementation but I thought it would be implemented somewhere. Paul In D2, it's in std.algorithm.

Re: max function

2009-06-19 Thread Paul D. Anderson
Jarrett Billingsley Wrote: On Fri, Jun 19, 2009 at 5:05 PM, Paul D. Andersonpaul.d.removethis.ander...@comcast.andthis.net wrote: Okay, where is the max(a,b) function in phobos? I realize it's a dead simple template implementation but I thought it would be implemented somewhere.