Immutability and other attributes, please review
Timon Gehr
timon.gehr at gmx.ch
Thu Jun 14 15:24:15 PDT 2012
On 06/14/2012 06:42 PM, Jonathan M Davis wrote:
> I wish that you could do
>
> auto f = new float(2.1);
>
> and therefore
>
> auto f = new immutable(float)(2.1);
>
> but you can't.
This seems to be an arbitrary limitation.
Imho it should be fixed. Probably it was missed because allocating a
primitive type on the heap is not a very common operation.
More information about the Digitalmars-d-learn
mailing list