in reply to Perl 6 mini-essay: eqv, ===, =:=, etc.

From the article, regarding the =:= operator:

It tells you whether two names are aliased to the same symbol.

What's the difference between a name and a symbol?

  • Comment on Re: Perl 6 mini-essay: eqv, ===, =:=, etc.

Replies are listed 'Best First'.
Re^2: Perl 6 mini-essay: eqv, ===, =:=, etc.
by John M. Dlugosz (Monsignor) on May 05, 2008 at 23:36 UTC
    I was not speaking formally, but the idea is that a symbol is the thing itself (the things in the symbol table), and it may be referred to by different names, or even no name at all if it is anonymous.

    More formally, =:= is used to compare item containers, since normally anything you do to an item drops through to the item in the container. $x =:= $y is just a shortcut for VAR($x) === VAR($y).

    —John

      In perl 5, these were called "thingies". Until the 3rd edition of the Camel, where they became the pedestrian "referents".

        Ah. Right. I like "referent". A similar term is "object", but that word most often means an object in the OO sense. "Referent" works well for the generic case. "Object", for the specific (OO) case.

        The Camel says a "symbol" is a name in a symbol table.