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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Go 1.6 is Released

562 点作者 geetarista大约 9 年前

29 条评论

sinatra大约 9 年前
Go checks a lot of boxes for <i>my</i> ideal language for developing web services: Static type, C derived, has garbage collection, generates a single binary, supports concurrency very well, is opinionated, is small&#x2F;simple, its community prefers to just use standard lib for most work, etc. Yes, Generics is an issue and so is debugging. But, overall, I can&#x27;t think of many other options that check so many boxes.<p>EDIT: I must highlight the point about checking lot of boxes. In many discussions about features of programming languages, we get responses like, &quot;language Y does that too. Why not choose that language?&quot; Well, because we don&#x27;t pick languages for one specific feature. We pick them for the combination of features.
评论 #11121869 未加载
评论 #11121857 未加载
评论 #11124684 未加载
评论 #11124442 未加载
评论 #11121861 未加载
评论 #11122327 未加载
评论 #11123141 未加载
评论 #11136910 未加载
评论 #11124204 未加载
评论 #11124499 未加载
评论 #11129578 未加载
jonesb6大约 9 年前
The reason I love Go is that every time I pull it out, I write a small amount of it and it runs beautifully. For example my company has a critical micro-service implemented in ~300 lines of Go, it&#x27;s been running for six months now without a single hiccup, highly performant, very sexy.<p>The reason I will almost never use Go for web apps is because interaction with databases is limited (almost entirely) to raw queries. Maybe I&#x27;m spoiled by the likes of Active Record, Sequelize, Mini-mongo, Sql-alchemy, etc, but it&#x27;s a huge drop in efficiency to spin my own SQL.<p>The point to take away here is that Go, more so then many other languages IMO, has its strengths and weaknesses. If you use Go in one of it&#x27;s weaker use-cases you&#x27;re gonna have a bad time. If you use Go for one of it&#x27;s strengths you&#x27;re gonna have a great time.<p>See you guys and gals in n weeks when we need to rehash the pros and cons of Golang again.
评论 #11122171 未加载
评论 #11122392 未加载
评论 #11122142 未加载
评论 #11123427 未加载
评论 #11122681 未加载
评论 #11122281 未加载
评论 #11122345 未加载
评论 #11122421 未加载
nathany大约 9 年前
There is a Go AMA on reddit for the next 24 hours.<p><a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;golang&#x2F;comments&#x2F;46bd5h&#x2F;ama_we_are_the_go_contributors_ask_us_anything&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;golang&#x2F;comments&#x2F;46bd5h&#x2F;ama_we_are_t...</a>
评论 #11123659 未加载
eddiezane大约 9 年前
I&#x27;ve really enjoyed the time I&#x27;ve spent with Go but feel like the state of dependency management has kept me away.<p>Am I being stubborn in my longing for an npm, Ruby Gems, or pip? Is there a reason why one of these hasn&#x27;t emerged&#x2F;been adopted by the community? (I&#x27;m aware of the 1.5 experiment with vendoring.)<p>Semver and pinning versions has always just <i>made sense</i> to me. I can easily adopt new features and fixes automatically without worrying about things breaking.<p>How does the community feel this far along?
评论 #11122119 未加载
评论 #11122838 未加载
评论 #11122384 未加载
评论 #11122068 未加载
评论 #11123435 未加载
评论 #11122282 未加载
Cyph0n大约 9 年前
I can&#x27;t wait to see what&#x27;s new in 1.6! I really had a pleasure working with Go for my senior project last year. If I need to write either a server (HTTP or TCP&#x2F;UDP), or a client application that must be easy to build and distribute, Go is my first choice.<p>What Go is lacking at this moment in my opinion is:<p>1) A comprehensive and mature web framework. Play w&#x2F; Scala is my go-to choice now, with Django a very close second.<p>2) A decent cross-platform GUI toolkit; heck, I&#x27;d settle with Qt and&#x2F;or .NET bindings for Go. The power of Go is statically linked binaries, and I think the area of desktop applications will be easy to target if a good solution emerges.
评论 #11122204 未加载
评论 #11121914 未加载
评论 #11121905 未加载
评论 #11133451 未加载
dominotw大约 9 年前
I&#x27;ve been writing some gocode recently and huge chunk of code is<p><i>if err != nil ...</i><p>I know you can do if ; err!=nil but that not that much better and you end up in deeply nested if blocks.<p>i have to mentally block out err !=nil to read any gocode linearly. How is this acceptable, I don&#x27;t get it.<p><a href="https:&#x2F;&#x2F;blog.golang.org&#x2F;errors-are-values" rel="nofollow">https:&#x2F;&#x2F;blog.golang.org&#x2F;errors-are-values</a><p><i>We recently scanned all the open source projects we could find and discovered that this snippet occurs only once per page or two</i><p>This seems false from my experience, def way more than 1 or 2 instances per page.
评论 #11123948 未加载
评论 #11122986 未加载
评论 #11123064 未加载
评论 #11124556 未加载
golergka大约 9 年前
I just recently started with go, but I love how simple (apart from horrible $GOPATH) and effective that is.<p>Still can&#x27;t get over the moment I realized that in order to deploy my web server on an empty virtual box all I had to so was to build and upload. After all the languages and frameworks that required endless customization and setting up it was a true eureka moment.
评论 #11123175 未加载
protomyth大约 9 年前
Can someone give a decent explanation of the following:<p>1) Supposed I have a library that was written in C that receives a security update which is used in a Go program. Under what conditions do I need to get a recompiled version of the Go program.<p>2) Supposed I have a library that was written in Go that receives a security update which is used in a Go program. Under what conditions do I need to get a recompiled version of the Go program.<p>3) Is there a way to tell from the binary that the program was written in Go?<p>Trying to figure this out for my Sys Admin dealing with Vendors role.
评论 #11122426 未加载
评论 #11122480 未加载
评论 #11122466 未加载
评论 #11122355 未加载
jernfrost大约 9 年前
Read the debate with Go vs Java here with interest. I&#x27;d like to add a point I think is missed by the Java crowd in favor of Go.<p>Complexity isn&#x27;t free. Java might have and abundance of tools, IDE&#x27;s, language features etc, but you can&#x27;t claim that matching up every Go feature or tool with something superior found among the huge Java universe makes Java superior in every way.<p>I find that there is an unfair assumption being used by the Java advocates, here which is that every software developer has a deep knowledge of Java.<p>As one of those people who can certainly write Java code, but who is not familiar with the Java eco system and has not spend a lot of time with I must say that Go to me is a clear winner.<p>My exposure to professional Java development has been quite frustrating compared to writing Go code. Every Java project I have gotten has used some different built tool: Ant, Maven or Gradle. They have also all seem to use different IDE&#x27;s. The complexity of each of these tools is staggering. Considerable time has to be spend learning these tools.<p>Go in comparison is laughably simple. You can get productive in less than a week without ever having used the dam thing. The tools and the libraries are very quick to get into. In fact I find Go code so easy to read that although I am an iOS developer by trade, I frequently read Go code to understand how various algorithms and network stuff works.<p>An organization would easily be able to add people to a Go project without much previous exposure to the language. Adding people with limited Java knowledge to a Java project however would be far more expensive. Considerable time would be needed for training.<p>There is a lot of money to be saved from having a well thought out standard library combined with a simple language with simple well thought out tools.<p>As a Swift&#x2F;Objective-C developer, my major gripes with my development process is actually the complexity of the tooling. Both Swift and Objective-C are fairly straightforward languages IMHO. In this regard I greatly envy Go developers although I do enjoy the strong typing and generics in Swift.
kampsy大约 9 年前
I fell in love with python because it was clean and easy to work with. Like most developers, I used to use c when I needed a performance boast. Then I got fade up and decided to learn a new language that could give me the feel of python and the performance of c. Two languages from a list of 10 passed the above criteria Go and Rust. Java did not even make the list because I Don&#x27;t use languages that are owned by evil empire&#x27;s(Oracle).<p>I went with Go because it was easy to use and understand. I could read other people&#x27;s code easily( Even with a large code base, I have never found myself scratching my head trying to figure out my own code does), could set up my workspace in less than a minute and all the text editors I used (sublime, Atom, Vim) supported it. I Don&#x27;t really care about the fancy IDE&#x27;s. Just syntax highlighting and code completion is good for me.<p>I started learning go on September 2015. And I have managed to implement the porter stemmer algorithm and an inverted index in it. Miss generics but LOVE interfaces. The fact that any concrete type that implements method 1 satisfies interface 8 is awesome. You can easily reuse code from different package without changing anything.
alblue大约 9 年前
Release notes are here:<p><a href="https:&#x2F;&#x2F;golang.org&#x2F;doc&#x2F;go1.6" rel="nofollow">https:&#x2F;&#x2F;golang.org&#x2F;doc&#x2F;go1.6</a><p>Notably new this time is transparent http&#x2F;2 support and tighter rules for integration with C.
dh997大约 9 年前
Go CSP is minimal and ortongonal, I just wish it did three things:<p>0. could lto optimize or link against a shared library to reduce the titanic size of compiled programs and cut down on duplication of instruction. Therue is no practical sense in wasting memory and storage on systems with dynamic linkers: edge cases of including the world for rare situations but YAGNI in real production systems.<p>1. could output flat binaries and self-host runtime (panics) for practical kernel development in Go<p>2. Generics (both types and immutable constraints), I think C++1z has the right approach to this (and constexpr and constant arrays are nice and are able to provide more hints to the compiler).<p>I also wonder why Go wasnt developed as an IR compiler &#x2F; llvm frontend, because it would&#x27;ve levered an existing debug and portability ecosystem with much less work.
评论 #11122347 未加载
zenlikethat大约 9 年前
Congratulations to the Go team! There are many excellent folks working on the Go language and it&#x27;s been an absolute joy to work with in my experience.
ukd1大约 9 年前
<a href="https:&#x2F;&#x2F;golang.org&#x2F;doc&#x2F;go1.6" rel="nofollow">https:&#x2F;&#x2F;golang.org&#x2F;doc&#x2F;go1.6</a> - lists the changes
sriram_malhar大约 9 年前
Have been using Go since its release, and like the deployment experience, the feeling of solidity of putting together a tight system. The toolchain is great. 1.6 is yet another Solid release in that direction. Thank you all.<p>However, the _language_ doesn&#x27;t give me much programming pleasure alas. Since there is plenty of time for Christmas, here&#x27;s my syntax wish list :)<p>&#x27;?&#x27;: C&#x27;s if-then-else operator.<p>Block-syntax for closures ala Ruby. Unifying blocks and closures makes creating DSLs easy, but doesn&#x27;t add to cognitive load (no more than using anon funcs)<p>Pattern matching like Scala, ML, Rust.<p>Sum types -- (Yeah, I lied. Not just syntax enhancements), or at least discriminated unions. I&#x27;d like to see an example (in the FAQ entry on the topic) on why support for it is troublesome.<p>For 2017 Christmas, -------------------<p>Macros ala Nim.<p>Systemic support for Goroutines, including detection of conditions where a goroutine would never get scheduled. Erlang-like tools for built-in goroutine insight.<p>------<p>My ideal language would be an intersection of Nim+Go
评论 #11141911 未加载
Exuma大约 9 年前
I upgraded and it broke our app, something to do with the way it handles https has changed, not sure what
评论 #11122465 未加载
评论 #11122310 未加载
评论 #11122193 未加载
niccaluim大约 9 年前
Not officially. &quot;Go 1.6 is soon (but not yet).&quot; - commit message from today.
评论 #11122049 未加载
评论 #11122024 未加载
评论 #11121886 未加载
bmh_ca大约 9 年前
Go has a lot going for it.<p>That said, there were a few points I noted, based on a recent go I gave it (pardon the pun), at least in relation to my style of development for this project:<p>1. It&#x27;s hard to tinker, mostly because it&#x27;s fussy about what variables are defined or used. This is a strength in the usual course, but when one is trying to posit what a poorly documented 3rd party API is doing it can be a serious pain.<p>By tinkering, I found that I often had to comment out or uncomment lines, or handle or ignore errors. There was a lot of flipping up to the beginning of the file. I would spend so much time fiddling with the lines that I would at times forget what I was even trying to do.<p>I might just have memory problems, I acknowledge. :)<p>However, what would make sense is a go &quot;mode&quot; where it runs in a non-strict way, with what would ordinarily be errors being warnings. A &quot;tinker&quot; or &quot;whirl&quot; mode, so to speak, that softened the requirements so one could get a better sense of what was happening before committing to a design.<p>An interpreter mode might also be quite valuable, to address this problem and the ones below.<p>2. Error propagation - I see the point of errors being returned and the lack of a &quot;throw&#x2F;catch&quot; style, and its benefit, but I feel it&#x27;s a lot of typing for marginal gain. I usually end up with an error propagating a set of strings that ultimately conclude as: &quot;Database error: transaction error: processing error: http error: <i>reason</i>&quot;, which is to say: equivalent but less information than a stack trace would give. I see the mandatory error acknowledgement simultaneously as a strength and a waste of time, and I admit being on the fence about it.<p>3. The next point I am not on the fence about: Debugging. It is not apparent how to get a stack trace, and the best option looks like including a third party application that generated errors. For the obvious and reasons below, this is a problem.<p>4. Package management: This was fussy and could be time-consuming. It is not apparent to me why one needs a GOROOT and a GOPATH. I think Python&#x27;s virtualenv gets it right, by comparison. A second but related problem is package versions. Maybe I&#x27;m missing something, but making sure you get the latest semantically equivalent version (in the semver sense) was not apparent.<p>5. Package debugging: If you include a 3rd party package, and it&#x27;s broken in any way, it&#x27;s a veritable quagmire to identify and fix the problem. My experience was that the best way to debug a third party package was to block and copy all its bits and then debug it as a local source in your own. Obviously this is bad for a long number of reasons, and I might be missing something, but no more apparent option appeared when I investigated on how to tell what is even happening inside third packages.<p>6. Automated testing: I&#x27;ve not seen a test runner that reloads when source files change, particularly one that might be used with goapp from AppEngine, meaning go auto-testing can be quite a bit of patient thumb-twiddling as the binary reloads.<p>Which is all to say that there are some concerns about developing a larger project in this language, particularly if there is quite a bit of complexity that needs lots of testing or potential debugging and&#x2F;or inclusion of many third party packages.<p>I&#x27;ve not reviewed the 1.6 notes, so perhaps these are addressed to some extent there.<p>In any case, none of the issues above is insurmountable, and overall I give the Go design a lot of credit for experimentation and interesting choices, but the issues I&#x27;ve seen above give me pause before committing a team to the language – for the moment.
评论 #11122506 未加载
评论 #11122860 未加载
评论 #11122174 未加载
评论 #11122650 未加载
pori大约 9 年前
Seen a lot of Erlang mentions in this thread. Is that the native alternative to Go?<p>Personally, I prefer to write code in a functional manner. While I&#x27;ve always thought Go looked like an amazing platform for programming in general, I haven&#x27;t been keen on moving to another imperative language.<p>It seems the landscape for functional alternatives are mainly Scala and Clojure which are both based on the JVM and require a bit of time to learn the tooling. I am not a Java or JVM export, so I haven&#x27;t been too inspired by this either.
评论 #11125668 未加载
helper大约 9 年前
Rebuilding our integration docker image right now. If all our tests pass I expect to have go 1.6 binaries in production by this evening.
CSDude大约 9 年前
I would just love some IDE-debug love and better packaging. More packages I use and more I distribute my files, compilation takes considerably longer. Maybe I do not know, but is there some process to compile some parts before hand and link only the changed resulting binary?
jay_kyburz大约 9 年前
Can anybody tell me if you can run Go in Chrome using the NaCL stuff? I remember there was talking of it a few years ago but I don&#x27;t know if anything ever came of it.<p>A google seach show that you could build for NaCal in Go 1.3 but only run it in special builds not Chrome itself.
评论 #11123310 未加载
robbles大约 9 年前
There was some discussion leading up to the release about whether to merge the &quot;SSA&quot; branch, which seems to be a refactor that allows for easier compile time optimisations but also slows compile times for the time being.<p>Does anyone know if that was included in this release?
评论 #11122454 未加载
评论 #11122752 未加载
评论 #11122452 未加载
rphlx大约 9 年前
&gt; Source trees that contain a directory named “vendor” that is not used in accordance with the new feature will require changes to avoid broken builds<p>That seems a little bit distasteful.
kiril-me大约 9 年前
Do you know any framework using http2 on go lang?
enneff大约 9 年前
Binaries are up but not everything is fully updated yet. Announcement blog post coming shortly.<p>Edit: Blog post up: <a href="https:&#x2F;&#x2F;blog.golang.org&#x2F;go1.6" rel="nofollow">https:&#x2F;&#x2F;blog.golang.org&#x2F;go1.6</a> maybe change the article link to that?
评论 #11122559 未加载
andreamichi大约 9 年前
A draft for the 1.6 release notes: <a href="https:&#x2F;&#x2F;tip.golang.org&#x2F;doc&#x2F;go1.6" rel="nofollow">https:&#x2F;&#x2F;tip.golang.org&#x2F;doc&#x2F;go1.6</a>
obelisk_大约 9 年前
Release notes: <a href="https:&#x2F;&#x2F;golang.org&#x2F;doc&#x2F;go1.6" rel="nofollow">https:&#x2F;&#x2F;golang.org&#x2F;doc&#x2F;go1.6</a><p>Mods, maybe change OP link to this?
评论 #11122114 未加载
fuddle大约 9 年前
Go is great, but I wish they would add terany operator support.
评论 #11124354 未加载