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)
Previous text:
2003-04-16 01:44: Subject: Pointers/lvalues
I agree this much: ||
The lack of pointers is a major disadvantage right now at times. I often use mappings or dummy objects to implement pointers now, but that has a rather large overhead.
And using reference(x) instead of &x might be good for the beginner (but I am somewhat dubious), but I don't think it makes the code more readable, really.
If nothing else, more or less all programmers know the C-pointer syntax.
void silly( int *q ) { *q = 10; }
int var; silly( &var );
void silly( pointer(int) q ) { dereference(q) = 10; }
int var; silly( reference(var) );
/ Per Hedbor ()