Rob Kinyon skribis 2006-01-19 16:10 (-0500):
> There are no references in Perl6.

When you said that one can't use OO in Perl 5, I had something to say
because it's a recurring subject.

I have to admit, though, that I've never seen this statement, or
anything implying it. It's entirely new to me. 

Is your Perl the same as that of other people on this list? :)

> In fact, the only think you have in Perl6 is objects, so why do we
> need to take something that isn't an object (which doesn't exist)

Could you live with @foo being an array, and @foo in scalar context
returning a reference to that array? And with arrays being interfaces to
underlying Arrays, which are objects, which makes arrays non-objects
that can be used *as* objects?

Perl still has non-object types. They may represent objects internally,
but they work differently from what we've historically been calling
objects. Especially in assignment, the differences are huge, because an
object is considered a reference, while "real" scalars, arrays and
hashes evaluate to (a list of) their values, or a useful representation
(like the number of elements) when used in non-OO fashion.

> &bless was a brilliant idea for Perl5. It's wrong for Perl6.

I think it's needed to be able to convert Perl 5 code

But you have probably thought about this more than I, so I'll ask you:
what's the alternative?


Reply via email to