Perl's reference is the best compare with other languages

H

howa

after learning many years of programming languages, e.g. C, pascal,
C++, PHP

I believe Perl reference is the best and easy to learn, much better
than C pointer
 
K

kruhft

after learning many years of programming languages, e.g. C, pascal,
C++, PHP

I believe Perl reference is the best and easy to learn, much better
than C pointer

I've never understood that if someone can understand that a variable
can hold a value (like in algebra), what the difficulty of
understanding that there can be variables that point to values
is...like a box and what's in the box, or a mailing address and the
house that it specifies.

Good to hear that references are easier to learn in perl though ;-)
 
J

Jürgen Exner

kruhft said:
I've never understood that if someone can understand that a variable
can hold a value (like in algebra), what the difficulty of
understanding that there can be variables that point to values
is...like a box and what's in the box, or a mailing address and the
house that it specifies.

True. But what about a box+3 or a house + 4*sizeof(house)? That does not
make much sense any more.

jue
 
P

Puckdropper

True. But what about a box+3 or a house + 4*sizeof(house)? That does
not make much sense any more.

jue

"house + 4*sizeof(house)"

That makes sense to me. "house" is a little ambiguious, so substitute
"house number." I'm at 123 Main St. and I know the house numbers are
incrementing by 4. I need to be at 137 Main, so I'm 4 houses away.

(123 + houses*(4)) = 137
houses = 4

Puckdropper
 
J

John Bokma

kruhft said:
I've never understood that if someone can understand that a variable
can hold a value (like in algebra), what the difficulty of
understanding that there can be variables that point to values
is...

In a way same here, I never had troubles with it, but maybe because the
language I learned after BASIC (or next to it) was Z80 assembly :-D.

ld hl, 3000
ld a, 45
ld (hl), a

or something like that :)

On the other hand, I have explained this to quite some people (pointers,
addresses), and some people get it the first time, and for others it takes
several sessions to explain it. And replace "pointers" with something
else, and I am sure there are things for which I or you (or both) fall in
the latter category :-D.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top