@AliCehreli: you may consider including Jonathan's trick in your book in the para above this heading: http://ddili.org/ders/d.en/const_and_immutable.html#ix_const_and_immutable.variable, %20immutable
Jonathan M Davis via Digitalmars-d-learn wrote: > yes, having > > enum s = ta("s)"; > > and using s all over the place will result in an allocation each time that > s is used. However, you can combine the two and avoid that problem. e.g. > > enum e = ta("s"); > string s = e; > > The ta is run at compile time, and it's only evaluated once. -- Shriramana Sharma, Penguin #395953