News for hackers. Stuff that matters.
Re:Things Rust shipped without by berkut on Friday July 03, 2015 @05:05PM (#9827948)
Yeah, that's one thing that's really putting me off looking at Rust - the possibility of it enforcing style in the future.

Hanging braces style for C/C++ is rarely allowed in the coding standards I've had to use in the past for embedded and real-time stuff in the defence industry, because it can be a source of errors.

Aligned opening and closing braces are much more common (in line with ADA's style).

Re:Things Rust shipped without by Manishearth on Saturday July 04, 2015 @03:13AM (#9829514)
Rust doesn't enforce style anywhere. You can turn off all style warnings at once too with `#![allow(bad_style)]` or a command line flag.

By default it just warns. That's not enforcing.

Re:Things Rust shipped without by andresmanz on Saturday July 04, 2015 @09:08AM (#9830035)
Come on, even that flag's name is ridiculous. They basically say, for example, that writing camel case, which is the preferred style in most of the projects I've seen, is bad style. Do they like being unnecessarily antipathetic? People think about their personal preferred style for years, and they have very good reasons for choosing them. And in _many_ cases, it's exactly the style that's called bad by Rust's creators.

How about making it the opposite, '#![allow(default_style)]'? Or at least '#![allow(non_default_style)]'?

Re:Things Rust shipped without by Manishearth on Sunday July 05, 2015 @03:24PM (#9834600)
In some cases skirting style can be harmful (e.g. in match statements there's an ambiguity with enum variants and variable bindings that is not an issue because of the style lints).

But I get your point. I think people would be open to that naming change if you file an issue.

Re:Things Rust shipped without by andresmanz on Wednesday July 08, 2015 @05:39AM (#9850663)
Yes, you're right, of course.

Maybe I could at least try, yes. I mean... It's kind of silly, I know, but that would already change the way I look at Rust.

Re:Things Rust shipped without by nrc on Friday July 03, 2015 @05:21PM (#9828013)
The compiler will not enforce more style in the future, that will be done by Rustfmt, a separate and optional tool. In fact, it is likely that the compiler lints which enforce style will move out of the compiler and in to Rustfmt at some point in the future.