What is the shortest way to define an immutable token of unique type?

Walter Bright newshound2 at digitalmars.com
Mon Mar 15 08:11:36 UTC 2021


On 3/14/2021 9:37 AM, Andrei Alexandrescu wrote:
> Another attempt:
> 
> immutable hex = function {};

That won't have a unique type.

It may not have a unique value, either. The compiler/linker may merge identical 
immutable objects.


More information about the Digitalmars-d mailing list