>From: Gordon Vreugdenhil <gordonv@model.com> >I don't think that I like this idea. The problem is that >assignment compatibility (copy-in/copy-out) is assymetric. >If you had, for example, an non-assignable default expression, >then it might be Ok to treat it as just an "in". However, >if the default was assignable but the assignment compatibility >on the "out" direction was violated would one treat the >default as an "in" or produce an error? I am not suggesting that it be treated as an input only if it was assignable. I am suggesting that the default always be treated as an input only, regardless of whether it is assignable or is assignment compatible. So the issue you raise does not come up. I think that if someone leaves out an inout argument, they generally want the output discarded, not stored in some place used by all the callers. And the next time they call, they want the same default value as last time, not the value that got left in that shared place by the previous call. When you leave off an input, you want a default value. When you leave off an output, you want the output discarded. So when you leave off an inout, you probably want a default value for the input, and the output discarded. (For a ref arg, there seems to be no choice but for the default to be a valid reference.) This just seems to me to be more useful than the alternative. Some input from users would be helpful here, since I could be wrong about this. Steven Sharp sharp@cadence.comReceived on Mon Sep 18 15:26:44 2006
This archive was generated by hypermail 2.1.8 : Mon Sep 18 2006 - 15:26:52 PDT