TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

My Perspective on Go

52 点作者 zhenjl超过 10 年前

7 条评论

rakoo超过 10 年前
&gt; Unlike other languages where you can just create a directory and get started, Go wants you to put things in $GOPATH.<p>I&#x27;ve seen this complaint a lot and don&#x27;t agree with it. Go just want everything to be accessible through $GOPATH, it doesn&#x27;t have to _be_ there. Here&#x27;s how I organize my code:<p>- I have all my dev in ~&#x2F;dev. Anything goes here, whether it&#x27;s go, ruby,... it&#x27;s my workspace<p>- I put $GOPATH where it should be, in ~&#x2F;.local&#x2F;share&#x2F;go<p>- Whenever I need to go get something, it ends up in ~&#x2F;.local&#x2F;share&#x2F;go&#x2F;src&#x2F;domain.com&#x2F;author&#x2F;package, as expected<p>- When I need my package to be in $GOPATH, I just symlink ~&#x2F;dev&#x2F;project to ~&#x2F;.local&#x2F;share&#x2F;go&#x2F;src&#x2F;github.com&#x2F;rakoo&#x2F;project, so it is visible in $GOPATH<p>After that everything works as expected (modulo some minor quirks I have to do at go install time), and you don&#x27;t have to have a specific workspace just for go. It&#x27;s also minimal enough (once per new project) that I&#x27;m not too bothered by it.
评论 #8888425 未加载
评论 #8887766 未加载
评论 #8889265 未加载
yawaramin超过 10 年前
To me that criticism you quoted seems really misguided. A person who doesn&#x27;t want to see performance measures from new users will never understand how they (the new users) are typically using the language and where the most common performance blocks are at the newbie stage.
评论 #8887485 未加载
wcummings超过 10 年前
&gt;In a way, I consider that to be an advantage coming in to a new programming language, in that I have no preconceived notion of how things “SHOULD” be. <i>I can learn the language and use the constructs as they were intended, and not have to question WHY it was designed that way because it’s different than what I know.</i><p>&gt;I just <i>could not get my non-functional mind to wrap around the functional Scala</i>. And since I really didn’t need to code (nor the developers want me to), <i>I gave up on learning Scala.</i><p>&gt;I’ve barely heard of generics, communicating sequential processes, and other <i>“cool”</i> and <i>“advanced”</i> concepts.<p>Emphasis added
bascule超过 10 年前
&quot;For me personally, I don’t know any better. I have never used generics and I haven’t found a situation where I strongly require it.&quot;<p>Sounds an awful lot like <a href="http://c2.com/cgi/wiki?BlubParadox" rel="nofollow">http:&#x2F;&#x2F;c2.com&#x2F;cgi&#x2F;wiki?BlubParadox</a>
评论 #8888027 未加载
评论 #8889193 未加载
cdelsolar超过 10 年前
Is it true what he is saying about a single binary? Go doesn&#x27;t do dynamic linking?
评论 #8887940 未加载
评论 #8888452 未加载
评论 #8887924 未加载
VeejayRampay超过 10 年前
&quot;I haven’t used this extensively, but in my attempt to optimize the integer compression library, I added different C and assembly snippets to try to squeeze the last ounce of performance out of Go. It was fairly easy and straightforward to do.&quot;<p>Ah, the famous integer compression library modifying non-programmer :)
评论 #8887668 未加载
duvander超过 10 年前
Just a non-programmer with a masters in Computer Science...
评论 #8887681 未加载
评论 #8887825 未加载