<p>We need some more material for our <a href="https://wiki.theory.org/YourLanguageSucks" rel="nofollow">YourLanguageSucks</a> entry.</p>
<hr/>**评论:**<br/><br/>scorbuticgopher: <pre><p>The <a href="https://golang.org/doc/faq#nil_error" rel="nofollow">non-nil nil</a> thing is missing from the list. That's a legitimate complaint. Some of these other complaints, however, seem silly.</p>
<blockquote>
<p>The select statement is blocking, but if you add a default case it suddenly isn't.</p>
</blockquote>
<p>Why is this bad? How else would the default case work? This is the obvious way for it to work.</p>
<blockquote>
<p>Go does not require break at the end of every case in a switch statement</p>
</blockquote>
<p>I hate that you have to write <code>break</code> at the end of every case in C# even though there's no fallthrough. There's no need for a superfluous <code>break</code> if there's no fallthrough. What's the problem?</p>
<blockquote>
<p>If you import a library or declare a variable, but do not use it, your program will not compile even if everything else is valid. Debugging is fraught with adding and removing "import" statements.</p>
</blockquote>
<p>Use <code>goimports</code>. Variables can cause trouble, however. On the other hand, an unused variable is often a bug, and the Go compiler has helped me catch many bugs with this <em>feature</em>.</p>
<blockquote>
<p>Go's error type is simply an interface to a function returning a string.</p>
</blockquote>
<p>So? You can add whatever you want to your own <code>error</code> types, you can even create your own interface for errors. Again, what's the problem?</p></pre>SteveMcQwark: <pre><blockquote>
<p>The <a href="https://golang.org/doc/faq#nil_error" rel="nofollow">non-nil nil</a> thing is missing from the list. That's a legitimate complaint.</p>
</blockquote>
<p>On the one hand, it makes perfect sense that the nil interface value is different from an interface with a typed nil value in it, especially since you can actually call methods on a nil pointer without issue. On the other hand, it could maybe have been clearer by using a different name for an interface's zero value.</p></pre>tuxlinuxien: <pre><p>I can give you materials for YourLanguageSucksSucks instead</p></pre>bmurphy1976: <pre><p>Do we really need this here? I come here to get a respite from the constant Go bashing everywhere. It's not perfect, we know that, we don't care. Time to move on.</p></pre>dgryski: <pre><p><a href="https://github.com/ksimka/go-is-not-good" rel="nofollow">https://github.com/ksimka/go-is-not-good</a></p></pre>1Gijs: <pre><p>'We' should grow up: stop whining and be master of our own destiny.</p>
<p>So either:
1) Get over it and love Go 'as-is'
2) Move to another language (there are so many - take your pick)
3) Create your own language or dialect (be bold)</p></pre>itsmontoya: <pre><p>Lack of generics</p></pre>shovelpost: <pre><p>Your Go list is bad and you should feed bad.</p></pre>brogrammingsins: <pre><p>This generic question makes one say: because of threads like this... </p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传