Putting a 'null' value in every type is also a popular language feature, but 
it's a bad one and Rust deliberately does something different, for safety.  
Argument by feature popularity doesn't mean much in a world where most 
languages are just some new syntax for the same (often broken) concepts.

As for this specific case, I think allowing overloading += makes sense, but I 
don't feel strongly.

keegan

----- Original Message -----
From: "Artem Egorkine" <[email protected]>
To: "Masklinn" <[email protected]>
Cc: [email protected]
Sent: Friday, August 23, 2013 11:52:49 AM
Subject: Re: [rust-dev] Augmented assignment



Augmented assignments are not unique to python. They are found in C, Java, 
Perl, Go, Ruby, JavaScript etc. One could argue that if they were so terrible, 
they would never have made it to so many programming languages.... 


On Aug 23, 2013 9:28 PM, "Masklinn" < [email protected] > wrote: 
> 
> On 23 août 2013, at 12:44, Chris Morgan < [email protected] > wrote: 
> 
> > https://github.com/mozilla/rust/issues/5992 
> > 
> > (Coming from a Python background I know the concept as augmented 
> > assignment; they are also known as assignment operators. Or just +=, 
> > ^=, <<= and the like.) 
> > 
> > I want augmented assignment in Rust for all types, so I had a crack at 
> > implementing this. I have an implementation mostly complete in my 
> > augmented-assignment branch 
> > ( https://github.com/chris-morgan/rust/compare/augmented-assignment ), 
> > but even if I managed to convince the Rust side of rustc that I was 
> > competent, LLVM called my bluff. 
> > 
> > The last state of my branch and what appears to be wrong (extra 
> > argument going to the LLVM Call) is documented in #5992. 
> > 
> > Is there anyone who would be able to look at my patch and get it to 
> > work (or even figure out just where the wrong is)? I just rebased it 
> > and so it is up to date, but if left for another few weeks it 
> > doubtless will continue to bitrot. 
> 
> For the record, I think augmented assignments are a terrible ideas and one of 
> the worst features of python. 
> _______________________________________________ 
> Rust-dev mailing list 
> [email protected] 
> https://mail.mozilla.org/listinfo/rust-dev 

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to