by CyberDildonics · 5y ago · 0 comments
Consider
char *p = 0;
some complicated code that should have set p but didn't...
char c = *p; // SEGV
So do you have a way to push that error all the way back to wherever you think it should be pushed?
The array access should error out on the line that it happens.
The dereference could print a line of the last assignment, but this isn't what was being talked about.
In Tcl, stuff just gets auto expanded on assignment and returns "" (I think) on dereference. We chose to return undef. I'm not sure what the problem is.
I also explained a huge difference between the two already (you know how large an array is and can detect an out of bounds access when it happens).