Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Are three star programmers a real thing?

Name: Anonymous 2014-05-19 7:43

I can't imagine any situation where you would need 3 or more levels of indirection for a pointer.

int i = 0;
int *ip01 = &i;
int **ip02 = &ip01;
int ***ip03 = &ip02;
int ****ip04 = &ip03;
int *****ip05 = &ip04;
int ******ip06 = &ip05;
int *******ip07 = &ip06;
int ********ip08 = &ip07;
int *********ip09 = &ip08;
int **********ip10 = &ip09;
int ***********ip11 = &ip10;
int ************ip12 = &ip11;
************ip12 = 1; /* i = 1 */

Name: Anonymous 2014-05-19 10:49

Two levels of indirection should be enough for anyone

Name: Anonymous 2014-05-19 11:04

>>5
hurrr durrr

Name: Anonymous 2014-05-19 11:44

>>1
2 ought to be enough for anybody not living in a basement

Name: Anonymous 2014-05-19 12:10

I can imagine a situation for 3 levels of indirection, if you pass in the address of a 2-star pointer so that the function can change the value of the pointer itself, but that's already some pretty bad design - anything beyond that is retarded.

Name: Anonymous 2014-05-19 13:55

>>1

If you remove data structures from C/C++, then something like ptr->field_a->field_b->field_c would translate into *(*(*(ptr+a)+b)+c), and when a=b=c=0, we have ***ptr - i.e. 3 stars

So tree star programmer is a bad programmer, because such person doesn't know how to refactor his code or use data structures.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List