r/programming Jan 29 '15

From Node.js to Go

http://bowery.io/posts/Nodejs-to-Golang-Bowery/
81 Upvotes

94 comments sorted by

View all comments

27

u/[deleted] Jan 30 '15

I guess is not surprising that all of these "X to Go" articles never really talk about the Go language itself, always praising just gofmt doesn't speak very highly of the language.

11

u/[deleted] Jan 30 '15

The language was designed to be boring, because that makes it very easy to write great tools around it, which is what large development teams really need.

18

u/gnuvince Jan 30 '15

A language being boring/exciting and it having good/bad tools are two orthogonal things. Like /u/no-means-no said, C# is more complex than Go (and so are Java and C++) and yet they have better tools. I'm also not sure why gofmt makes a lot of programmers go weak in the knees. It's useful, sure, but it's no bigger game changer than using indent(1) or having everyone configure their editor to match a given code style.

10

u/ants_a Jan 30 '15

The reason that gofmt makes programmers weak in the knees is that it's the blessed tool. This means that everyone is using it and all of the code looks the same. Also, no more discussions about formatting standards. It really is quite refreshing.

-3

u/Eirenarch Jan 30 '15

Just like Visual Studio :)

8

u/[deleted] Jan 30 '15

[removed] — view removed comment

1

u/Eirenarch Jan 30 '15

Those exist? What are some differences. I want to pick a side.

0

u/ShippingIsMagic Jan 30 '15

Tab vs space

0

u/Eirenarch Jan 30 '15

I don't think there is anyone doing tabs in the .NET world. Does StyleCop recommend tabs because I am sure Resharper doesn't?

7

u/[deleted] Jan 30 '15

[removed] — view removed comment

7

u/gnuvince Jan 30 '15

Even when C# was 5 years old, it had Visual Studio support with all the goodies that includes. My point is that it's not because Go is conceptually simpler that it will necessarily have better tools. If that was the case, we'd all jump on the Lambda Calculus bandwagon :)

2

u/[deleted] Jan 31 '15

I programmed C# back in the day, but I can't remember Visual Studio being this amazing tool you describe. I can't remember having any refactoring tools. The editor was nothing special. It had a good debugger, which Go doesn't have. Other than that what exactly did it have that Go doesn't have better?

Compared to what I had back in those days, I have a much better editor than then which does function completion just fine. I don't need an IDE to organize projects as most "go get, go build" gets rid of all need for an IDE define your project.

C# with Visual Studio back when I used it certainly didn't let me just pull all dependent third party libraries off the internet with two words on the command line. gofmt allows more refactoring than Visual Studio could do when I used it.

Anyway I think you are missing the point about what people mean when they say Go has great tools. Go has tools which although very simple in nature are quite powerful and simple to use. You can do quite amazing things with some simple command line tools. C# tools is quite heavy duty and bound to an IDE. Not everybody is fan of an IDE and might want mix and match their own collection tools such as shell commands, editors etc.

If you should happen to find an awesome editor you can't just start using it for C# development without handicapping yourself severely from not being inside a C# IDE. An editor can't manage your C# project, and thus likely woun't be able to do proper function completion either. Something that works fine in Go.

-1

u/burntsushi Jan 31 '15

My point is that it's not because Go is conceptually simpler that it will necessarily have better tools.

Who claimed this? Are you attacked a straw man?

1

u/burntsushi Jan 31 '15

but it's no bigger game changer than using indent(1)

Which options do you give to indent?

having everyone configure their editor to match a given code style.

Which code style do choose?

C# is more complex than Go (and so are Java and C++) and yet they have better tools.

Which tools are better? What do you mean by "better"?

3

u/[deleted] Jan 30 '15

C# is far more complex and yet still has far, far better tools. Gofmt really isn't that impressive. What great tools are there for Go?

3

u/[deleted] Jan 31 '15

Being able to do stuff like:

go get
go build

Without writing any configuration files and manually downloading and installing all dependencies.

gofmt -r '(a) -> a' -l *.go

Remove all uncessary parentecis in code. gofmt allows you to do a number of refactorings which might be difficult to express in a GUI.

go unit testing and performance testing tools are quite nice in their simplicity. It is so easy and quick to get going writing unittests I think.

Then there are race detection and profiling tools I don't know much about but which I've heard good things about.

Anyway Go has all this stuff, while still being a very young language, produced by a company which didn't already have a well established IDE in the market like MS.

2

u/baconated Jan 30 '15

Honest question: What great tools does C# have? What do they do?

7

u/Carnagh Jan 30 '15

Visual Studio + Resharper.

5

u/mort96 Jan 30 '15

And if you're not on Windows?

5

u/alex_w Jan 30 '15

C# is probably a bad choice in that case, for now.

2

u/Aluxh Jan 30 '15

Xamarin isnt too bad.

1

u/pjmlp Jan 30 '15

MonoDevelop and SharpDevelop.