Immutability by default [was: Re: Tidy auto [Was: Re: @disable]]
Leandro Lucarella
llucax at gmail.com
Tue Jan 19 09:44:29 PST 2010
Adam D. Ruppe, el 19 de enero a las 10:56 me escribiste:
> 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.
I don't understand, you are vulnerable to that kind of bugs now too:
const receiver = 1;
const reciever = 2; // meant to rebind, but spelling error goes unnoticed by compiler
--
Leandro Lucarella (AKA luca) http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
aFR [afr at my.farts.cause.nuclear.reaction.org] has quit IRC (Ping timeout)
More information about the Digitalmars-d
mailing list