Perl's reference is the best compare with other languages

Discussion in 'Perl Misc' started by howa, Jan 1, 2007.

  1. howa

    howa Guest

    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
     
    howa, Jan 1, 2007
    #1
    1. Advertising

  2. howa

    kruhft Guest

    On Dec 31 2006, 10:14 pm, "howa" <> wrote:
    > 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 ;-)

    --
    kruhft
    metashell.blogspot.com
     
    kruhft, Jan 2, 2007
    #2
    1. Advertising

  3. kruhft wrote:
    > On Dec 31 2006, 10:14 pm, "howa" <> wrote:
    >> 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.


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

    jue
     
    Jürgen Exner, Jan 2, 2007
    #3
  4. howa

    Puckdropper Guest

    "Jürgen Exner" <> wrote in
    news:DMjmh.10326$Pr4.2001@trndny06:

    >
    > 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
    --
    Wise is the man who attempts to answer his question before asking it.

    To email me directly, send a message to puckdropper (at) fastmail.fm
     
    Puckdropper, Jan 2, 2007
    #4
  5. howa

    John Bokma Guest

    "kruhft" <> wrote:

    >
    >
    > On Dec 31 2006, 10:14 pm, "howa" <> wrote:
    >> 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...


    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.

    --
    John Experienced Perl programmer: http://castleamber.com/

    Perl help, tutorials, and examples: http://johnbokma.com/perl/
     
    John Bokma, Jan 2, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Diego
    Replies:
    2
    Views:
    152
    Stefan Rusterholz
    Aug 16, 2008
  2. Matthew Braid
    Replies:
    0
    Views:
    91
    Matthew Braid
    Apr 11, 2006
  3. Paddy3118

    Perl examples in many other languages

    Paddy3118, Jan 5, 2007, in forum: Perl Misc
    Replies:
    1
    Views:
    82
    Paddy3118
    Jan 5, 2007
  4. Peter J. Holzer

    Parallel search in Perl and other languages

    Peter J. Holzer, Jul 28, 2008, in forum: Perl Misc
    Replies:
    5
    Views:
    99
    Isaac Gouy
    Aug 25, 2008
  5. PerlFAQ Server
    Replies:
    0
    Views:
    127
    PerlFAQ Server
    Apr 8, 2011
Loading...

Share This Page