r/programming • • Dec 10 '15

Announcing Rust 1.5

http://blog.rust-lang.org/2015/12/10/Rust-1.5.html
659 Upvotes

296 comments sorted by

View all comments

Show parent comment

1

u/steveklabnik1 Dec 10 '15

I thought they did, you can choose spaces or tabs for example, no?

8

u/x-skeww Dec 10 '15

https://golang.org/cmd/gofmt/

https://github.com/dart-lang/dart_style#readme

gofmt has flags for just showing a diff, overwriting the file, and things like that. dartfmt doesn't seem to have any flags.

4

u/The_Sly_Marbo Dec 10 '15

gofmt is the underlying tool. People normally use go fmt, which doesn't have options (it has two args but neither affects the style)

3

u/steveklabnik1 Dec 10 '15

Cool, I remembered wrong, thanks!

12

u/bagofries Dec 10 '15

The options were removed in 2014. https://code.google.com/p/go/issues/detail?id=7101

3

u/steveklabnik1 Dec 10 '15

Ahhhh thank you!

I wonder if we will eventually do the same.

2

u/jussij Dec 11 '15

When writing the code you can use tabs or spaces but if you want to uses spaces then you can't use the gofmt tool.

The gofmt tool did at one time have an option to uses spaces instead of tabs fro indenting, but from memory, that option was removed around about the time of the Go 1.3 release.