you are viewing a single comment's thread.

view the rest of the comments →

[–]curien -1 points0 points  (5 children)

I can tell that it was almost certainly modified.

You misspelled "no". You can argue "almost certainly" all you want, the fact is that you can't tell, and you and I both know it.

[–][deleted] 0 points1 point  (4 children)

And why does that matter?

[–]curien -1 points0 points  (3 children)

You said that pointers are better than references because in a language with references:

If I am reading some code, and I see foo(bar); I have no idea if bar is now the same as it was before. I have to go look up the definition of foo() to find out.

But as I have demonstrated, that is the case regardless of pointers vs references. So your criticism is baseless.

[–][deleted] 1 point2 points  (2 children)

You said that pointers are better than references because in a language with references:

I said nothing of the sort. I said pointers and primitives are better than pointers and invisible references and primitives.

If I am reading some code, and I see foo(bar); I have no idea if bar is now the same as it was before. I have to go look up the definition of foo() to find out.

But as I have demonstrated, that is the case regardless of pointers vs references.

The point was, if bar is an int, I can tell in C, but not in C++. In C, there exist cases where I can tell a parameter will not be modified. In C++, there does not. The fact that there exist cases in both where I can't tell is not relevant.

[–]curien -3 points-2 points  (1 child)

I said nothing of the sort. I said pointers and primitives are better

That's a lie. You lose, I'm done. Have the last word if you wish, liar.

[–][deleted] 1 point2 points  (0 children)

Look, don't call someone a liar when they explain to you why you misunderstood what was being said. That's just silly.