Pointers and References
Date: Sun, 30 Nov 2003 08:23:23 -0600
To: Perl Perl <beginners@perl.org>
Hi Kids,
What is a pointer and what is a reference? How are they different? If
I read a book on C++ pointers and references, will it say the exact
same things as a book on Perl references?
- Jason
When Banzan was walking through the Union Square greenmarket
he overheard a conversation between a vendor and his customer.
"Do you have chocolate mousse?" asked the customer.
"We have chocolate pudding," replied the vendor.
At these words Banzan became enlightened.
-Mike Topp
Relevant Pages
- Re: Question on LSP
... In a dynamically typed language it becomes ... Polymorphism remains because it is a class, no specific type of the class ... is bound to the pointer until run-time. ... Each object references its methods! ... (comp.object) - Re: Test if memory pointer is valid?
... I can see setting a new pointer initially to the address of the beginning of an array, for example, and then incrementing the pointer to address subsequent elements, but that would usually be done inside a function, where the new pointer would go out of scope at the end of the function and be reinitialized if it is called again. ... I would like to see a specific example where it is necessary to have multiple references such as this where it would be necessary to check for it having been freed. ... copies of all the TLabel references already in the form as individual ... (comp.lang.pascal.delphi.misc) - Re: "Pointer" to an object? (i.e. reflect changes to origina
... that) you've now introduced the concept of a pointer to a variable, ... def method_missing ... references, but affects the way the attributes relate): ... (comp.lang.ruby) - Re: not null
... but I don't recall seeing any caused by null references. ... other pointer, and dereference it, your program will immediately crash ... Plus, in C, where pointer arithmetic ... I just think it's a lot less common. ... (comp.lang.ada) - Re: Why is OO Popular?
... references in Java, to say). ... address sets and leave the relationship to the client code. ... If you do (for example in the Customer table), ... referring another entity (similar to a typed pointer). ... (comp.object) |
|