if "do" makes the code more readable or more "beautiful", I higly recommend keeping this sugar syntax. If there are corner cases where do doesn't do the job, the developer should not use it in these cases.
It's still the same debat, when GIMP had this ugly multi panels system, developers was saying it is a window manager issue to handle them correctly. Yet, the GIMP software was a nightmare to use on almost everybody's desktop. Now they solved with a single window application, it is much more acceptable. It will be the same here. If you rely on special feature of the editor to indent properly. if is was only curly brace, most editor would do indentation properly, but here you have || and other exotic syntax most editor doesn't understand until a proper extension is written (which can take year for some editors). I personnally will always find much more readable (and maintainable): do function { someotherFunction() }; than function(|| someotherFunction()); ----- Gaetan 2013/12/2 Alex Bradbury <a...@asbradbury.org> > On 1 December 2013 03:54, Daniel Micay <danielmi...@gmail.com> wrote: > > I don't understand the point of `do` beyond making zero-parameter > > closures look a bit better. If it doesn't even do that, why bother? If > > an editor isn't indenting it properly, that's an editor issue. As far > > as I can tell, the vim indent file now handles it fine. > > I agree, I feel do should be considered for removal - I feel the > amount of sugar it provides is minimal yet it complicates the language > unnecessarily. Supposing that Rust did not have the `do` syntax > already, I tend to think there would be resistance to adding it for > these reasons. Is there currently an issue open regarding the future > of `do`? > > Alex > _______________________________________________ > Rust-dev mailing list > Rust-dev@mozilla.org > https://mail.mozilla.org/listinfo/rust-dev >
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev