in reply to The philosophy behind element reference syntax

It should be 'the'/'this' vs 'these'/'those'

It's singular vs plural (that's what scalar vs vector means anyway). If you are thinking of it as 'this' then you are thinking of it right. You just need to realize that '$' eq 'this' in perl.
  • Comment on Re: The philosophy behind element reference syntax

Replies are listed 'Best First'.
Re^2: The philosophy behind element reference syntax
by jcoxen (Deacon) on Dec 08, 2004 at 17:59 UTC
    Yeah, but to me, an array or a hash is an object - singular. It just happens to be made up of a bunch of smaller objects...the way a box of rocks is made up of individual rocks. This @rock is part of this @box-o-rocks. The @rock is an object and the @box-o-rocks is an object...at least in my mind. :)

    Cogito cogito, ergo cogito sum
    (I think I think, therefore I think I am)
Re^2: The philosophy behind element reference syntax
by halley (Prior) on Dec 08, 2004 at 21:22 UTC
    Mind you, the word this already has plenty of meaning in many other languages; it just so happens that Perl OO typically uses $self in such situations.

    --
    [ e d @ h a l l e y . c c ]