TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Go 1.17 Beta

118 pointsby 0xedbalmost 4 years ago

10 comments

37ef_ced3almost 4 years ago
As a developer I continue to be extremely happy with the Go language and the Go tools. Over the past 5 years Go has almost entirely replaced my use of C and C++. My Go programs (e.g., <a href="https:&#x2F;&#x2F;NN-512.com" rel="nofollow">https:&#x2F;&#x2F;NN-512.com</a>) are reliable, run fast, build fast, require no shared libraries, and have airtight error handling. Unfortunately, C++ is still necessary for my commercial work and I am amused daily by the absurd complexity and clumsiness of expression, slow builds, dynamic linkage problems across Linux releases, etc.
评论 #27464674 未加载
评论 #27464684 未加载
评论 #27464547 未加载
评论 #27465628 未加载
评论 #27465484 未加载
评论 #27464562 未加载
tschellenbachalmost 4 years ago
Work I need to do to use 1.17: None<p>Benefits: Improved performance and reduced hosting costs<p>Go is so nice for getting stuff done.
kubbalmost 4 years ago
I&#x27;ve been using go for years now at my work, and I have to say that it does have applications where it&#x27;s a perfectly capable tool.<p>The problems arise when you try to do something it&#x27;s not good at and you start wrangling with the language. If your coworkers have strong opinions on how Go is supposed to be used, it can make matters worse.<p>My biggest qualm by far is the limited type system, e.g. it has no concept of immutability or non-null pointers :( Also accomplishing simple things sometimes requires surprisingly weird techniques, e.g. cloning a slice.<p>The lucky people can evaluate a problem and choosing the right tool for it. The unlucky bastards like me get handed a language and are expected to build everything in it. It can be rough sometimes.
评论 #27475590 未加载
评论 #27467429 未加载
ru552almost 4 years ago
<i>Added a new testing flag -shuffle which controls the execution order of tests and benchmarks.</i><p>That&#x27;s a fun one
exacubealmost 4 years ago
My favorite part:<p>Go 1.17 implements a new way of passing function arguments and results using registers instead of the stack. This work is enabled for Linux, MacOS, and Windows on the 64-bit x86 architecture... For a representative set of Go packages and programs, benchmarking has shown performance improvements of about 5%, and a typical reduction in binary size of about 2%.
评论 #27469273 未加载
svnpennalmost 4 years ago
Random Go fact I learned recently: by default, HTTP requests automatically redirect. If you dont want that, you can do this instead:<p><pre><code> res, err := new(http.Transport).RoundTrip(req)</code></pre>
评论 #27465286 未加载
评论 #27465273 未加载
评论 #27465961 未加载
exacubealmost 4 years ago
It&#x27;s surpring that Go 1.17 discountined support for MacOS 10.12 (or older), which released only 4 years ago.<p>Along with deprecating Intel support, it seems like Apple, their users and the ecosystem is totally fine not giving a shit about supporting aging software. It doesn&#x27;t seem like anyone cares that much either.<p>Even more impressive that on average, Macbooks have a much longer lifespan than other laptops, while the software they run is intolerant of old versions.
jftugaalmost 4 years ago
I really enjoy writing command-line utilities to make my system admin job more efficient:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;jftuga?tab=repositories&amp;q=&amp;type=public&amp;language=go&amp;sort=stargazers" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jftuga?tab=repositories&amp;q=&amp;type=public&amp;la...</a><p>Any feedback is most welcome!
karmakazealmost 4 years ago
&gt; Conversions from slice to array pointer: An expression s of type []T may now be converted to array pointer type *[N]T. If a is the result of such a conversion, then corresponding indices that are in range refer to the same underlying elements: &amp;a[i] == &amp;s[i] for 0 &lt;= i &lt; N. The conversion panics if len(s) is less than N.<p>&gt; Note that the new conversion from slice to array pointer is the first case in which a type conversion can panic at run time. Analysis tools that assume type conversions can never panic should be updated to consider this possibility.<p>WHY! So now we can&#x27;t trust that the type *[N]T won&#x27;t panic at runtime when accessed by in-range index values. This should be identified as an unsafe conversion.
评论 #27468011 未加载
评论 #27475653 未加载
EFruitalmost 4 years ago
As someone who&#x27;s been using Go for a long while now, I can&#x27;t help but wonder if modules and other recent changes aren&#x27;t a step backwards. Maybe I&#x27;m a change-averse geezer, but modules still seem like an overcomplicated solution for a solved problem. Needed a particular version of something? Great. It happens. Add a submodule and toss it in vendor&#x2F;. Why in God&#x27;s name do we need to proxy source code through Google-hosted services which they&#x27;ve been reluctant to even open source? And at the root of it all, the GOPATH model simply wasn&#x27;t bad enough to be worth replacing! You have the full source repo right there, in a predictable, semantically-useful location. When you `go get` something, use `-u`. If a package fails to work with the current upstream, vendor an old version, _or update the depending package_! Ideally, I&#x27;d only ever have one copy of source code anywhere on my computer, preferably in the form of revisions in a source repo. Contrary to popular belief, disk space and bandwidth are neither free, nor infinite, and I&#x27;d like to make good use of mine. NPM and `node_modules` are NOT designs to aspire to!<p>If the Go tooling insists on involving itself with versioning, dependencies, and source control, it should actually USE the source control tools to manage versioning and dependencies! It isn&#x27;t rocket science to make a temp directory, clone from the local repo, check out a tag, and use that for building. Git even has facilities to check out the tree at a specific commit, no full clone required. (Granted, my view is Git-centric, but I believe that mercurial and svn also allow you to clone and check out labelled versions, especially considering those are _the basic requirements_ of an SCM.) And why do we need to verify cryptographic integrity of downloaded code bundles when the SCMs typically use cryptographic primitives to describe versions? Then to mandate a gatekeeping &quot;sum database&quot; on top of all that?<p>Finally, it is depressing to me how shut-in and closed-off the core team seems. The designs for big language changes are rarely ever proposed by the community, only by people already in the team. While (I hope) the community&#x27;s input helps inform their decisions, the final module design was rsc&#x27;s. Before he drafted the design document, dep versioning was a user-space&#x2F;community problem, but after it came from him, then—and only then—was dependency version management truly considered for the toolchain. The generics design came from, and was accepted by the core team. Rob Pike&#x27;s recent d̶e̶̶c̶̶i̶̶s̶̶i̶̶o̶̶n̶ proposal to support taking the addresses of simple types is—as one might expect—unquestionably going to be added.<p>The greatest thing that could happen to Go would be a community-organized and -centric fork, like Gitea was to Gogs. Even if they didn&#x27;t maintain strict compatibility with each other, I know which one I&#x27;d use.
评论 #27469612 未加载