How to embed data within an executable?

Gary Willoughby dev at nomad.so
Sun Feb 2 12:45:43 PST 2014


On Sunday, 2 February 2014 at 19:57:11 UTC, Dicebot wrote:
> On Sunday, 2 February 2014 at 17:45:37 UTC, Gary Willoughby 
> wrote:
>> 	enum embed = getData();
>> }
>
> I am pretty sure you want immutable variable here, not enum. 
> Latter is placement constant.

I thought this was an idiomatic way to write eponymous templates? 
Manifest constants by their nature can not be mutated.

http://dlang.org/enum.html


More information about the Digitalmars-d-learn mailing list