What is the difference between enum and shared immutable?

matheus matheus at gmail.com
Thu Oct 29 01:39:35 UTC 2020


On Thursday, 29 October 2020 at 01:26:38 UTC, Mike Parker wrote:
>
> enum int[] arr = [1,2,3];
> someFunc(arr);
>
> This is identical to
>
> someFunc([1,2,3]);
>
> Manifest constants have no address. They are effectively 
> aliases for their values.

Hi Mike,

I really didn't know about this.

Thanks for the information,

Matheus.


More information about the Digitalmars-d-learn mailing list