1 and 3, mainly, and for 1 mainly by using 2.
And for 3, mainly to change the value of things while you are iterating over them. That can arguably be implemented in some other way than references/pointers.
But references does have the advantage that they are fairly well known (they exists in most languages)
/ Per Hedbor ()
Previous text:
2003-04-16 03:07: Subject: Pointers/lvalues
What would you primarily use pointers for?
Multiple return values? Call-by-reference? Iteration? Something else?
I personally don't like laying down in the path of progress, (especially if it's moving very fast) but I think pointers would be a step backwards for Pike. However, I will reserve final judgement until I figure out what it's good for. God knows I've implemented a few dubious things in Pike. :)
/ Fredrik (Naranek) Hubinette (Real Build Master)