Talk:Language Comparison Table: Difference between revisions
Content added Content deleted
(According to the C++ standard, references are clearly not objects) |
No edit summary |
||
Line 49: | Line 49: | ||
identifier of D is “''deriveddeclaratortypelist'' reference to T.” ''[...]'' [Note: a reference can be |
identifier of D is “''deriveddeclaratortypelist'' reference to T.” ''[...]'' [Note: a reference can be |
||
thought of as a name of an object. ] |
thought of as a name of an object. ] |
||
::::: I cannot see where it follows from that [[C++]] references are names. Do you mean "name", a syntactical element, "identifier", member of a name space? This is obviously wrong, because references can be created dynamically as most of other objects, while names are static. --[[User:Dmitry-kazakov|Dmitry-kazakov]] 15:16, 5 August 2008 (UTC) |
|||
::: And later: |
::: And later: |
||
:::: 3 It is unspecified whether or not a reference requires storage (3.7). |
:::: 3 It is unspecified whether or not a reference requires storage (3.7). |
||
::: Given that objects do require storage, this clearly shows that references are not objects. |
::: Given that objects do require storage, this clearly shows that references are not objects. |
||
::::: Wrong. The compiler is free to optimize any objects out, while preserving the program semantics. [[C++]] merely gives an explicit permission to do so for reference objects. --[[User:Dmitry-kazakov|Dmitry-kazakov]] 15:16, 5 August 2008 (UTC) |
|||
::: Also note that the standard always mentions references explicitly after objects, where both objects and references can be used. |
::: Also note that the standard always mentions references explicitly after objects, where both objects and references can be used. |
||
::: But of course you are invited to quote relevant parts of the standard (of a draft of your choice) to try to disproof me. --[[User:Ce|Ce]] 14:46, 5 August 2008 (UTC) |
::: But of course you are invited to quote relevant parts of the standard (of a draft of your choice) to try to disproof me. --[[User:Ce|Ce]] 14:46, 5 August 2008 (UTC) |