No we should not support enum types derived from strings
Alexandru Ermicioi
alexandru.ermicioi at gmail.com
Wed May 12 21:32:50 UTC 2021
On Wednesday, 12 May 2021 at 15:41:31 UTC, 12345swordy wrote:
> On Wednesday, 12 May 2021 at 15:31:29 UTC, deadalnix wrote:
>> On Wednesday, 12 May 2021 at 14:35:27 UTC, 12345swordy wrote:
>>> Replacing the item in the box with the different yet exact
>>> same item, doesn't mean that you didn't modify the box.
>>> Again, print the object memory address, and you will see what
>>> I am talking about.
>>>
>>> -Alex
>>
>> I legitimately can't tell if you are an idiot or a troll.
>
> What kind of idiot that ignores official documentation provided
> by Microsoft that clearly states that classes are reference
> types not value types!? Your coding examples does NOT DISPROVE
> THIS NOTATION WHATSOEVER!!!!
>
> -Alex
I think, you both talking about same thing. I think what he meant
about half value type, half reference type, is that the
variables/function parameters, themselves are references to the
data an object has, and that reference is basically a value type,
while the actual object data is stored in memory on that address
found in variable/parameter, and this half value/half reference
semantics are packaged in a single type, which cannot be broken
apart.
I.e. you can't have a variable that just a simple pointer to some
heap memory, and you can't also have a variable that actually
contains the data the object has on stack, like in C++ for
example.
This is the same thing what you've meant by classes being
reference types, he just went a level lower into the
implementation of so called reference types.
To remark, I'm Java developer, not C#, though both have common
roots.
Best regards,
Alexandru.
More information about the Digitalmars-d
mailing list