Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Use Hash? Array? Still confused after all these years.

by exussum0 (Vicar)
on Jul 21, 2005 at 22:05 UTC ( [id://477029]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Use Hash? Array? Still confused after all these years.
in thread Use Hash? Array? Still confused after all these years.

You are right on all counts. In c, you create a buffer overflow (underflow?) unless you are careful w/ your pointer arithmatic. php I believe doesn't mind. Perl, yeah.

It's fairly universal to say non-negative numbers though, on the concept level. But that's a preference in teaching the concepts, eh? :)

----
Give me strength for today.. I will not talk it away..
Just for a moment.. It will burn through the clouds.. and shine down on me.

Replies are listed 'Best First'.
Re^4: Use Hash? Array? Still confused after all these years.
by brian_d_foy (Abbot) on Jul 22, 2005 at 03:16 UTC

    I don't say "non negative numbers" either, because you can't use most "non negative numbers" for array indices. I say "counting numbers", "whole numbers", or "cardinal numbers" depending on my mood. It's not really a teaching preference so much as accurately describing the concept.

    --
    brian d foy <brian@stonehenge.com>
      Which non negative numbers aren't usable?

      ----
      Give me strength for today.. I will not talk it away..
      Just for a moment.. It will burn through the clouds.. and shine down on me.

        Pi? 0.06? Rational numbers (negative or not) are not usable array indices.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://477029]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-29 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found