in reply to Listen to Tilly ... he knows what's what!
in thread References

I'm sorry I'm not making myself clear in what my goal is.
First off I wanted to know if there were an easy and understandble way to filter out references, so that it was transparent that it was the hash from the caller that was being worked on. This was to archieve a way to hide the "gory" details about references ;)

When I figured out that the only way to do this is to alter the symbol table (which is a hell of a lot more difficult to read and understand), I was curious if there were a visible speed difference, which I gladly saw there was not.
Alas now I NO reason use this now.

ps. As Efficiency of $$var, ${$var} shows there is no difference in b and c.

T I M T O W T D I
  • Comment on Re: Listen to Tilly ... he knows what's what!

Replies are listed 'Best First'.
Re: Re: Listen to Tilly ... he knows what's what!
by dragonchild (Archbishop) on Aug 20, 2001 at 18:09 UTC
    Now, you've piqued my curiousity. Why on earth would you want to filter out the most powerful syntax tool in Perl since the subroutine?!? References are the sole thing that took Perl from a glorified scripting language to a programming language that rivals the expressibility of almost every other C-like language out there!

    In addition, references are not a very complicated concept. Try explaining how C does strings to something, one day. Or, try explaining the friends concept in C++. All of a sudden, references become reeaaaalllly simple.

    ------
    /me wants to be the brightest bulb in the chandelier!

    Vote paco for President!

      It can be that both you and I believe that references are very easy to understand, but try to take a java programmer with little XP and teach him the concept of references. This was what I wanted to avoid, but if I have to explain sym tables instead, I will go a long way to explain refs first ;)

      T I M T O W T D I
        Every Java programmer knows references, even if they don't know it. It's an integral part of Java. Every time you use an object, you are using a reference. The difference is a syntax difference. Java uses '.' and Perl uses '->' ... Ok. Just say that '->' is '.' and you are 75% of the way there.

        ------
        /me wants to be the brightest bulb in the chandelier!

        Vote paco for President!