Re: Match properties as member variables

2013-12-15 Thread comco
On Sunday, 15 December 2013 at 23:38:57 UTC, comco wrote: On Sunday, 15 December 2013 at 23:13:39 UTC, Jakob Ovrum wrote: On Friday, 13 December 2013 at 12:01:28 UTC, comco wrote: From client perspective, properties look like member variables. With (auto) ref, a generic function can catch a mem

Re: Match properties as member variables

2013-12-15 Thread comco
On Sunday, 15 December 2013 at 23:13:39 UTC, Jakob Ovrum wrote: On Friday, 13 December 2013 at 12:01:28 UTC, comco wrote: From client perspective, properties look like member variables. With (auto) ref, a generic function can catch a member variable and read it and update it: void swap(T)(ref

Re: Match properties as member variables

2013-12-15 Thread Jakob Ovrum
On Friday, 13 December 2013 at 12:01:28 UTC, comco wrote: From client perspective, properties look like member variables. With (auto) ref, a generic function can catch a member variable and read it and update it: void swap(T)(ref T a, ref T b) {...} The client can use swap with member variabl

Re: Match properties as member variables

2013-12-15 Thread comco
On Friday, 13 December 2013 at 12:01:28 UTC, comco wrote: From client perspective, properties look like member variables. With (auto) ref, a generic function can catch a member variable and read it and update it: void swap(T)(ref T a, ref T b) {...} The client can use swap with member variabl

Match properties as member variables

2013-12-13 Thread comco
From client perspective, properties look like member variables. With (auto) ref, a generic function can catch a member variable and read it and update it: void swap(T)(ref T a, ref T b) {...} The client can use swap with member variables. But he can't use this swap with class properties - they