Re: I think this is a bug...



"Peter Oliphant" <poliphant@xxxxxxxxxxxxxxxx> wrote

> Ok, I'll buy that. Sort of. BUT --- doesn't this feature reverse the
> concept of type-checking? One of the reasons for passing something by
> value is so the original can't be changed. Doesn't this feature violate
> that concept?
>
Not necessarily. You really can't tell whether the value is copied
only from the expression at the call site.

For instance, if the declaration was
void Test_Method( Test_Struct% info);
there wouldn't be a copy involved.

Nonetheless, I agree implicit boxing is dangerous and it
shouldn't be in the language IMHO. But I'm afraid you need
to convince someone else.

FWIW, I use a helper function box or box_cast to do an
explicit cast.

-hg


.



Relevant Pages

  • Re: Need help changing code....
    ... Instead of just passing by the posting, I thought I would give you ... I am passing on this opportunity for the following reasons: ... There are always more message in various newsgroups ... that I may also want to get to, in the limited time that I have for ...
    (microsoft.public.vb.general.discussion)
  • Re: The laws clear: You must let drivers pass
    ... The law in Va and the reason behind it are clear. ... Use the left lane for passing and move to the right ... the reasons for not doing so - and a sprialing down ... If folks did this simple thing - WHEN they COULD - a lot ...
    (misc.transport.road)
  • Re: Sikhs oppose new turban rules
    ... DevilsPGD wrote: ... reasons as yet undetermined) -- Does that mean he can leave them on when ... passing through airport security? ...
    (rec.travel.air)
  • Re: ksh alias ignored in autoloaded function
    ... If I understand correct you want it for "cosmetical" reasons, to avoid ... passing $and $LINENO explicitly as arguments to the function. ... this is funny - the same solution is used in ksh93 source test scripts, ...
    (comp.unix.shell)