What is the thing that made you like go?

agolangf · · 482 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Was it the syntax? The performance of the language / compiler or something else?</p> <hr/>**评论:**<br/><br/>bastiaanvv: <pre><p>A big plus for me is that Go code is pretty easy to read and understand. I can come back to some code I created years ago and understand how it works in no time at all.</p></pre>codestation: <pre><p>Easy to deploy everywhere. No external dependencies + compiled + cross platform by default is huge since no other language offer this out of the box.</p></pre>Walkedairplane: <pre><p>Agreed. This is my number 1 and a whole bunch of secondary reasons touched on here.</p> <p>I really like how it doesn&#39;t get in the way of itself and can be really deployed across many platforms with ease</p></pre>kaeshiwaza: <pre><p>Simplicity</p></pre>Walkedairplane: <pre><p>Yep. Including compiling into a single self contained binary. Really nice for tooling across platforms</p></pre>hsoolien: <pre><p>I like the tool chain Something that kept me out of more advanced languages for a long time is the to me, convoluted compiler/pre process methods to deal with different compilers/platforms</p> <p>go build just works some 99% of the time.</p> <p>That said, I ended up fighting with gcc and cgo (I have managed one working windows install that cgo doesn&#39;t kvetch about) anyways but I&#39;ll take it.</p> <p>I also like the strong langauge documentation and if I keep go vet happy my code tends to look better.</p></pre>dilap: <pre><p>I&#39;d been hearing a lot of buzz about two languages, Rust and Go. One weekend I figured I&#39;d give them both a try, implementing a problem we used to use for interviews at my old company (part 1: scoring boggle boards; part 2: find highest scoring-boggle board you can).</p> <p>After a while of struggling with the Rust compiler, I finally got something to compile and...it didn&#39;t work. Not obvious why.</p> <p>Gave Go a try. Effortlessly I had something compiling that was correct on the first time. Cleaner than my best C++ solution. Ran more slowly -- about 60% as fast. Took 30 more minutes to easily parallelize it, and it ran faster than my C++ solution.</p> <p>I was hooked.</p> <p>(I still think Rust looks like a really interesting language; very ambitious. I hope to give it another shot some day.)</p></pre>hsoolien: <pre><p>I started with go, and while I do have a hello world behind me in rust, the setup of programs, while I understand the goals they&#39;re aiming for, has soured me.. And I already have a functioning go app with significant progress into other go projects... That said I should go back and look at rust again.</p></pre>dilap: <pre><p>Yeah, Rust is just a much more ambitious language.</p> <p>It&#39;s trying to pay zero performance penalty vs something like C++, have no garbage collector, and yet still be memory safe.</p> <p>That&#39;s kind of crazy, &amp; unprecedented. So there&#39;s a new programming model &amp; complexity to pay to get that.</p> <p>(It also seems like, from a distance, Rust doesn&#39;t seem to have the same culture of &#34;ruthless simplicity&#34; that is part of what makes Go so pleasant to work with.)</p> <p>But still: people are implementing things in Rust that are are setting the state of the art for speed+quality: ripgrep, fd, and (maybe someday; still too early to have reached its goals:) alacritty. Probably other stuff too. It&#39;s a very exciting language.</p> <p>Maybe someday we&#39;ll have a new language that implements the best of Go and Rust?</p></pre>GunsKnivesRadios: <pre><p>Concurrency!</p></pre>bmurph15: <pre><p>I come from a python world so what immediately hooked me was its a fairly low level language that feels a lot like a dynamic language like python. However what kept me coming back was the concurrency patterns, the stellar tooling, and support google has put a ton of manpower into that ensures its well maintained and supported. </p></pre>FUZxxl: <pre><p>It&#39;s a no-bullshit language with excellent documentation, good tooling, and a feature set with all the features you actually need and little more.</p></pre>014a: <pre><p>It doesn&#39;t let you outsmart yourself. </p> <p>I can&#39;t count how many bugs I&#39;ve seen in JS or Python related to overriding the assignment operator, or doing dumb things with prototypes, or 50-line lodash chains relying on edge cases of obscure functions. Yes, it might take ten times as much code. Turns out, the amount of code you write doesn&#39;t really correlate with how maintainable the system is; its all about how clean, organized, and understandable the code you write is. </p> <p>Option 1: Catch this shit in a PR. Works 80% of the time. Option 2: Don&#39;t even allow it in the language. Works 100% of the time. </p></pre>wjkohnen: <pre><p>Back in the day I was programming CLI tools for Linux, MacOS, Windows and Solaris with Java. Java isn&#39;t a natural fit for CLI and I was about to re-learn Python for that. Go is way simpler to cross compile and deploy than Java, Python or virtually any languages there are. So GOOS/GOARCH was the feature that made me curious. Then the performance (no VM bootup), first class concurrency, strong static typing, tabs over spaces (that alone let me know the language creators have their heart at the right place!) and the sum of many tiny features. </p> <p>When I did not understand what a std func did, I just read the source and understood immediately what was going on. In the first days of learning Go. Made me feel smart. </p></pre>lost_izalith_is_best: <pre><p>I love the type system.</p></pre>Sigafoos: <pre><p>The tour. </p> <p>I can’t tell you how refreshing it was to read a tutorial that didn’t start with “this is called a <em>variable</em>!” “Here’s something called a ‘for loop’”.</p> <p>Instead it was “here’s how for loops work in go”.</p> <p>It’s a good balance between accessible and useful. </p></pre>kibretw: <pre><p>Performance and simplicity. I am indifferent about the syntax.</p></pre>Attunga: <pre><p>It has replaced any thoughts that I would write something in Python or Java again with its clean syntax, standardised tooled formatting and especially static compilation across a number of platforms.</p></pre>shazow: <pre><p>Very easy to learn (fairly small language), and easy to collaborate with others (again because easy for others to learn, and opinionated formatting, etc). Also great standard library, which was important to me after maintaining things for many years that should have been standard library features (like a great HTTP client).</p></pre>MattieShoes: <pre><p>Typed, performant, straightforward, built with multithreading in mind from the start, without 30 years worth of weird corner cases or you get in C++. </p></pre>Sambothebassist: <pre><p>For some reason in Go, I can write an entire package with postgres integration without running or testing and it works first time. Coming from a .NET and Erlang background, I always had to take time cobbling together code with test suites, and don&#39;t get me started on JS/TypeScript.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

482 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传