On Thursday, 29 October 2020 at 00:55:29 UTC, matheus wrote:
On Wednesday, 28 October 2020 at 22:07:06 UTC, H. S. Teoh wrote:
... (This is why it's a bad idea to use enum with an array literal, because every time it's referenced you get a new copy of the array.)
...

Could you please give an example (Snippet) about this?


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.


Reply via email to