@cmuratori hey, have you explained the difference between int *foo and int &foo in a function parameter on stream?
@cmuratori @thorduragust It's purely semantic for the programmer which they prefer for typing / checking. The compiler treats them equally.
-
-
@cmuratori oh ok, thank you man, stack overflow just confused me!Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@cmuratori@thorduragust is this true? The parameter passed by reference has compile time guarantee of not being null. -
@katanadash@cmuratori@thorduragust void f(int& i){i=5;} int main(){int* i=0;f(*i); return 0;}segfaults on the i=5 assignment. - Show replies
New conversation -
-
-
@cmuratori@thorduragust (barring a programmer doing specific things to trick the compiler) -
@cmuratori@thorduragust as far as the byte code, yes there is no difference, but a pointer can be null while a ref cannot. - Show replies
New conversation -
-
-
@cmuratori@thorduragust If you add "const" they become significantly (and usefully) different. -
@tom_forsyth@cmuratori@thorduragust I was just about to type this minus the "usefully" part =)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.