[m-rev.] for review: copy/2 implementation for il backend

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Nov 27 23:39:42 AEDT 2002


On 27-Nov-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> 
> +		deep_copy_fields(t.GetFields(
> +				System.Reflection.BindingFlags.Public |
> +				System.Reflection.BindingFlags.Instance),
> +				n, o);
> +
> +		// XXX This requires that mercury.dll have
> +		// System.Security.Permissions.ReflectionPermission
> +		// so that the non-public fields are accessible.
> +		deep_copy_fields(t.GetFields(
> +				System.Reflection.BindingFlags.NonPublic |
> +				System.Reflection.BindingFlags.Instance),
> +				n, o);

Why not just call deep_copy_fields() once:

		deep_copy_fields(t.GetFields(
				System.Reflection.BindingFlags.Public |
				System.Reflection.BindingFlags.NonPublic |
				System.Reflection.BindingFlags.Instance),
				n, o);

?

Also, it would be nicer to use slightly more informative variable
names than `n' and `o'.

Otherwise that looks fine for now.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list