polyglotweekly / polyglotweekly.com

Curated articles about the art of programming.
http://www.polyglotweekly.com
ISC License
51 stars 5 forks source link

Add 'Thoughts of a Rustacean learning Go' #10

Closed Manishearth closed 9 years ago

Manishearth commented 9 years ago

This post gives an idea of what Go looks like from the point of view of someone coming from Rust. Whilst it's mainly intended for Rustaceans, it does try to give an insight into how things are done in Rust and Go to those familiar with neither.

Modified crosspost of http://inpursuitoflaziness.blogspot.in/2015/02/thoughts-of-rustacean-learning-go.html

I'm open to rewriting or expanding the post. Feel free to be brutal in the review :smile:

cc @bcoe @markstory @aredridel @jameswomack comments appreciated!

Manishearth commented 9 years ago

Oh, and I haven't yet generated the site locally since I'm on a slow connection for the next few days (installing npm would be hard), so if someone could test out the rendering that would be great!

bcoe commented 9 years ago

@Manishearth I really enjoyed this post, it was neat to hear the reaction of someone entrenched in one community giving another language a shot.

A couple comments:

Tone Policing

I think we have to be particularly careful about using a non-combative tone anywhere in this type of article.

In a perfect world, I'd like to see someone from the Go community write a follow up post to your article. The last thing we want is it turning into an argument between the two communities.

I think you did a good job of keeping a positive tone, but I think we can be even more paranoid.

Code Examples

You make a lot of great comparisons between the two languages, but I think more side-by-side code comparisons would really help tell the story... speaking of which:

I just added Rust support to Polyglot Weekly \o/

Manishearth commented 9 years ago

I addressed the individual comments (might add some more code examples later)

Tone Policing

Yeah, I had kept this in mind whilst writing the original post too -- I tried to make sure things came off as "as a Rust user, X seems strange to me (though it's not a bad idea)" or whatever over "Go is silly because of X"

I'll try to stay paranoid :wink:

Manishearth commented 9 years ago

@dyzp might be interested in writing the flipside "Thoughts of a Gopher learning Rust" or whatever :smile: (see also: http://www.reddit.com/r/rust/comments/33ngl0/my_first_lockless_datastructure_in_rust/)

@nox is from the Erlang community and these days is poking at Servo, he might be able to write a similar post for Erlang-to-Rust

Manishearth commented 9 years ago

(Also, yay for the syntax highlighting support :grinning: )

bcoe commented 9 years ago

@Manishearth I really enjoyed this second read through the article, the code examples helped pull things together for me (not knowing Go, or Rust it helped it gave me a starting point to start dissecting the syntax).

I figure give some other editors a chance to chime in, and then release the article Monday or Tuesday? I'm hoping we can keep up a momentum of one article a week.

Manishearth commented 9 years ago

Sounds good to me!

Oh, and you probably should learn Go if you have a lazy afternoon. Go is a language that can be picked up pretty easily (unlike Rust -- sure, you can pick up the basics easily, and the ownership/borrowing semantics take some time, but there are a lot of more complex features which means that you need some time to really get the language)

On that note, perhaps I should add a section to the article that mentions how easy Go is to pick up :)

bcoe commented 9 years ago

@Manishearth good advice, and good idea with regards to adding a small section.

I was just thinking while reading this article that I've been lazy about picking up languages recently.

Manishearth commented 9 years ago

added

bcoe commented 9 years ago

@Manishearth I like the additional section about how easy Go is to pick up :+1:

If you wouldn't mind deleting the two // comments in the post, I'll merge it when I get into work tomorrow? 9AM PDT.

Thanks for the great article.

Manishearth commented 9 years ago

Done!

Manishearth commented 9 years ago

I've been pushing minor fixes to master -- but is it fine if I open another PR with some slightly larger modifications which came up in the discussions? Or should we avoid changing a published post?

(I want to add a section on the compilation speed, and mention the idiomatic way of using interfaces. I can prefix both with an Edit: if necessary)

bcoe commented 9 years ago

@Manishearth I have no objections to making some edits to the post :+1:, but if they're major let's do them as pull requests.

savaki commented 9 years ago

@Manishearth I really enjoyed the post as well. I thought I might offer a type safe alternative that is a little more idiomatic go.

https://gist.github.com/savaki/c085cc86bb9dfb74c700