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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Go is a well designed language, actually

10 点作者 p4ul5 个月前

3 条评论

nu11ptr5 个月前
I would argue Go is a poorly designed language, though people are free to their opinions. Keeping things like null pointers when other languages got rid of them entirely (or used union type proofs to ensure they could not be referenced). The lack of tuples, pattern matching, enums, return ADT, etc. make it unwieldly to use in practice and verbose in nature. Sure, it is &quot;simple&quot;, but that isn&#x27;t the goal... the goal is to make it &quot;easy&quot; for the users to write correct programs.<p>The article also highlights explicit errors vs. exceptions. Sure, I would agree, but that isn&#x27;t the only comparison. The best comparison would be via &quot;return ADTs&quot; ala Rust (and they could have been special cased for a return type as Go&#x27;s designers did for special generic list&#x2F;maps) which make it possible to disambiguate errors from valid return values without risk of error.
评论 #42647348 未加载
评论 #42657634 未加载
9999000009995 个月前
It&#x27;s a great language... That was quickly overshadowed by Rust.<p>Rust is significantly more difficult, but faster and has more hype.<p>I would love Go that has been optimized to beat Rust. It&#x27;s actually a really easy language I wouldn&#x27;t mind working in. Feels like someone made Python you can complie.v
gnabgib5 个月前
Discussion (19 points, 1 day ago, 18 comments) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42628303">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42628303</a>