> Go has not anything like Python's PEP8, but a tool which formats code and it is being used widely by the projects. > I prefer that Rust would have such tool, replacing the usual compendium of do's and don'ts that allows interpretation:
I agree that such a tool would be wonderful. However, there are some guidelines that are only *suggestions*, and cannot be enforced automatically. For example, Rust encourages you to use lower_case_with_underscores for function names and CapitalCaseWithoutUnderscores for type names, but sometimes there are good reasons for violating these (e.g. providing a Rust wrapper for a library in a language with different naming conventions). Even Go has a styleguide containing many things that are not enforced automatically: http://golang.org/doc/effective_go.html On Tue, Apr 9, 2013 at 1:13 PM, John Mija <jon...@proinbox.com> wrote: > Go has not anything like Python's PEP8, but a tool which formats code and > it is being used widely by the projects. > > I prefer that Rust would have such tool, replacing the usual compendium of > do's and don'ts that allows interpretation: > > http://golang.org/doc/faq#Is_**there_a_Go_programming_style_**guide<http://golang.org/doc/faq#Is_there_a_Go_programming_style_guide> > > > El 09/04/13 18:02, Brian Anderson escribió: > > On 04/08/2013 11:25 PM, Andres Osinski wrote: >> >>> This may have been answered elsewhere, but I was wondering if the Rust >>> community has developed anything similar to Python's PEP8 for an >>> idiomatic convention for structuring code? >>> >>> The examples of both Python and Go seem to indicate that there's great >>> benefit in having a normalized coding style for code in the wild. >>> >> >> This would be very welcome, and I would be happy to help if somebody >> wanted to take the lead on this. >> ______________________________**_________________ >> Rust-dev mailing list >> Rust-dev@mozilla.org >> https://mail.mozilla.org/**listinfo/rust-dev<https://mail.mozilla.org/listinfo/rust-dev> >> >> >> ______________________________**_________________ > Rust-dev mailing list > Rust-dev@mozilla.org > https://mail.mozilla.org/**listinfo/rust-dev<https://mail.mozilla.org/listinfo/rust-dev> >
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev