> print @{ $cars->{$model} };
> print "Welcome back, $fullname, to $website!\n";
O.k., I'm convinced.
> Only $scalars can hold objects. Now, @arrays and %hashes can
> hold groups of objects, but only $scalars can hold objects.
That's not quite correct. @array or %hash can "hold" an object, via tie.
> The real problem is that we lack true object polymorphism. That is,
> objects are useless in number and string contexts. This is the problem
> that needs to be addressed.
You mean overloading needs to be fixed and finished?
> However, if you have object polymorphism, then you don't have this
> problem. Objects are automatically converted to numbers and strings
> on-demand.
Why should strings and numbers be so special? Shouldn't I want my
object converted to an array or a hash on demand? And if it's context
that drives the conversion, then the following should all be equally
reasonable:
$s = "$obj"; # convert to string
$n = $obj+0; # convert to number
$x = $obj[1]; # convert to array
$x = $obj{y}; # convert to hash
--
John Porter
- Re: RFC 109 (v1) Less line noise - let's get ... Clayton Scott
- Re: RFC 109 (v1) Less line noise - let's get ... Michael Fowler
- Re: RFC 109 (v1) Less line noise - let's get ... Graham Barr
- Re: RFC 109 (v1) Less line noise - let's get ... Kai Henningsen
- Re: RFC 109 (v1) Less line noise - let's get rid of @% Nathan Wiger
- Re: RFC 109 (v1) Less line noise - let's get rid ... Casey R. Tweten
- Re: RFC 109 (v1) Less line noise - let's get rid ... Karl Glazebrook
- Re: RFC 109 (v1) Less line noise - let's get ... Nathan Wiger
- Re: RFC 109 (v1) Less line noise - let's ... Karl Glazebrook
- Re: RFC 109 (v1) Less line noise - le... Jon Ericson
- Re: RFC 109 (v1) Less line noise - let's ... John Porter
- Re: RFC 109 (v1) Less line noise - let's get ... Damien Neil
- Re: RFC 109 (v1) Less line noise - let's ... Karl Glazebrook
- Re: RFC 109 (v1) Less line noise - le... Damien Neil
- Re: RFC 109 (v1) Less line noise... Casey R. Tweten
- Re: RFC 109 (v1) Less line noise... Karl Glazebrook
- Re: RFC 109 (v1) Less line n... Damien Neil
- Re: RFC 109 (v1) Less line noise - let's ... John Porter
- Re: RFC 109 (v1) Less line noise - le... Damien Neil
- Re: RFC 109 (v1) Less line noise... Jonathan Scott Duff
- Re: RFC 109 (v1) Less line n... John Porter
