Immutability by default [was: Re: Tidy auto [Was: Re: @disable]]

Adam D. Ruppe destructionator at gmail.com
Tue Jan 19 07:56:27 PST 2010


On Tue, Jan 19, 2010 at 11:52:16AM -0300, Leandro Lucarella wrote:
> I think he includes D1 code, which would be harder to port to D2. Makes
> sense to me, that's why I think introducing the := operator as an alias to
> immutable/const would be a good compromise. It makes extremely easy to use
> immutable/const variables while keeping backward compatibility.


Would this be a realistic fear with it?

receiver := 1;

reciever := 2; // meant to rebind, but spelling error goes unnoticed by compiler


If so, bah. Of course, I like it how it is now anyway.

> 
> -- 
> Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
> ----------------------------------------------------------------------
> GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
> ----------------------------------------------------------------------
> DIEZ "PUNGAS" MENOS
> 	-- Crónica TV

-- 
Adam D. Ruppe
http://arsdnet.net



More information about the Digitalmars-d mailing list