What is the real difference between Pointers and References?

后端 未结 22 2846
南方客
南方客 2020-12-01 04:33

AKA - What\'s this obsession with pointers?

Having only really used modern, object oriented languages like ActionScript, Java and C#, I don\'t really understand the

22条回答
  •  伪装坚强ぢ
    2020-12-01 04:57

    This is like asking, “what's this obsession with CPU instructions? Do I miss out on something by not sprinkling x86 MOV instructions all over the place?”

    You just need pointers when programming on a low level. In most higher-level programming language implementations, pointers are used just as extensively as in C, but hidden from the user by the compiler.

    So... Don't worry. You're using pointers already -- and without the dangers of doing so incorrectly, too. :)

提交回复
热议问题