Re: some proposed changes



> 
> Huw Rogers <count0 building2 co jp> writes:
> > * if a sequence is undef, it is marshalled as a zero length sequence.
> > Right now if it is not a true reference to an array it dies.
> 
> I don't agree with this at all.
> 
>  $a = []; print scalar (@$a), "\n";
>  $a = undef; print scalar (@$a), "\n";
> 
> Are very different; the second one is a warning. 
> 
> Allowing this would be similar to allowing "undef" to be marshalled as
> an empty string without any warning, which is similar to thinking
> in C that "" is the same as NULL. <shudder>

The sequence marshalling of undef is the most dubious of my proposals,
and I guess I should retract it.

However I note that attempting to marshal undef as a string currently
results in a core dump. In perl, undef is a scalar, interchangeable as
such with a string, and in CORBA "" is a null string (actual NULL is
invalid). So although I'd retract my sequence marshalling proposal, I
would say that undef should indeed be marshalled as a null string ("") 
(which would certainly be better than the current SEGV behaviour).

	-Huw



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]