Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualOberon_Command

Posted 08 January 2013 - 07:10 PM

The point with all this is that the (key) properties of "references" exactly mirror those of pointers: they are datatypes held in variables, and they get copied by value when they are passed into functions, just as much as pointers. That's the functionality that C++ exposes and abstracts for us. C++ programmers might not think about it that way, since in the ideal case, they can be optimized just like any other code. But as we've agreed, that last is an implementation detail.
 

No, C++ programmers don't think about it that way because in terms of the semantics of C++ (not the implementation details), references are not values. We are discussing the semantics of C++ here. The implementation details are interesting and a C++ programmer will often find it useful to keep them in mind, but as far as I can tell, they are not relevant to the discussion of the semantics of C++, the programming language.

#2Oberon_Command

Posted 08 January 2013 - 07:10 PM

The point with all this is that the (key) properties of "references" exactly mirror those of pointers: they are datatypes held in variables, and they get copied by value when they are passed into functions, just as much as pointers. That's the functionality that C++ exposes and abstracts for us. C++ programmers might not think about it that way, since in the ideal case, they can be optimized just like any other code. But as we've agreed, that last is an implementation detail.
 

No, C++ programmers don't think about it that way because in terms of the semantics of C++ (not the implementation details), references are not values. We are discussing the semantics of C++ here. The implementation details are interesting and a C++ programmer should keep them in mind, but as far as I can tell, they are not relevant to the discussion of the semantics of C++, the programming language.

#1Oberon_Command

Posted 08 January 2013 - 07:06 PM

The point with all this is that the (key) properties of "references" exactly mirror those of pointers: they are datatypes held in variables, and they get copied by value when they are passed into functions, just as much as pointers. That's the functionality that C++ exposes and abstracts for us. C++ programmers might not think about it that way, since in the ideal case, they can be optimized just like any other code. But as we've agreed, that last is an implementation detail.


No, C++ programmers don't think about it that way because in terms of the semantics of C++ (not the implementation details), references are not values. We are discussing the semantics of C++ here. The implementation details are interesting, but as far as I can tell, not relevant to this discussion.

PARTNERS