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.

Changes I would make to Go

113 pointsby jaxonduabout 8 years ago

14 comments

hhsnopekabout 8 years ago
&gt; First, functional programming is particularly difficult in Go. In fact the language discourages functional programming.<p>Then it seems that Go isn&#x27;t the language for you. With that Go nor any language, unless intended, is suppose to be a one-all solution for every problem. We can accomplish a majority, if not all, problems in a language, but this shouldn&#x27;t assumed that a language is intended to do so.
评论 #13918898 未加载
评论 #13918838 未加载
评论 #13924430 未加载
评论 #13920415 未加载
jrobnabout 8 years ago
OK, go will never have generics (except that it does in &quot;make&quot;, &quot;range&quot;, &quot;chan&quot;, ok whatever...). That&#x27;s fine with me. But including even just a few suggestions in the parent article would make Go a more approachable language to everybody.<p>* Pattern matching is intuitive and can be extremely powerful. * It&#x27;s pretty clear that Null should not exist anymore. * Multiple return values, but no tuples?!<p>The go designers seem to not have a problem with special cases so why didn&#x27;t they include special cases for an Option&lt;T&gt; and Result&lt;T,E&gt;, two things that, with pattern matching, would fit right into Go&#x27;s explicit error checking philosophy.
评论 #13920427 未加载
spraakabout 8 years ago
I really want to love Rust, but it&#x27;s so visually unappealing :&#x2F; I love how clean Go looks. I know it&#x27;s vain..
评论 #13919307 未加载
评论 #13919100 未加载
geodelabout 8 years ago
These are the changes that if made Go wouldn&#x27;t be language it is. Go is simple, straightforward if little verbose. To me Go fits perfectly for business apps that I write currently in Java.
评论 #13918572 未加载
评论 #13918709 未加载
评论 #13918635 未加载
kristianpabout 8 years ago
Like C, Go is a small language. Given that the creators of go like its smallness and simplicity, all those features are never going to be added to Go.<p>When Bjarne Stroustrup wanted to add OO features to C, he created C++, initially as a translator that output C. If someone wants to add features to Go, they can create a &quot;Go++&quot; to Go translator, with pattern matching, generics, tagged unions. Clearly it&#x27;s guaranteed to be very popular! &#x2F;s
评论 #13921039 未加载
CalChrisabout 8 years ago
&gt; First, functional programming is particularly difficult in Go. In fact the language discourages functional programming.<p>Well, if I were the king of the forest, I&#x27;d move functional programming from Rust to Go. With Rust, there&#x27;s a lot of this higher level stuff in a supposably lower level language that would be more at home and useful over in the two letter language.
评论 #13918830 未加载
评论 #13918835 未加载
评论 #13918741 未加载
Risordabout 8 years ago
For Go people: How (learning) Go made you better programmer?<p>I haven&#x27;t written any of these two languages but I have read Rust doc few times in depth and I constantly miss many of it&#x27;s features in my daily .net work since then.<p>Example: -Optional over null -Union types -Trait implementation is independent from source and target models
评论 #13919161 未加载
评论 #13919178 未加载
评论 #13919059 未加载
评论 #13919579 未加载
评论 #13924587 未加载
alphabettsyabout 8 years ago
This article should be called, &quot;Things I&#x27;d like to see in Go from Rust&quot;.
评论 #13918647 未加载
评论 #13918505 未加载
CalmStormabout 8 years ago
It seems to me golang and Rust are often being compared with each other. Given that Swift starts to be used on server side, I would love to see some comparison between golang and Swift, or Rust and Swift.
sdogruyolabout 8 years ago
Crystal would be a great choice for the author.
justicezyxabout 8 years ago
Do language​ debaters all think every human should speak one language?...
评论 #13927770 未加载
评论 #13919622 未加载
hubert123about 8 years ago
Just another generic complaint about Go&#x27;s lack of bloat. It&#x27;s all completely naive, never understanding why Go doesnt want generics beyond a simple &quot;b-b-but look, the pattern matching of Rust is simple too!&quot; No it isnt simple just because you say it is. It is the opposite of simple. I&#x27;ve read the Rust docs on it several times and I still dont have a clear mental picture of how to read a match statement out loud. &quot;match result with Some(number) .. then do..? But match HOW?&quot; I&#x27;ve been thinking of a clearer syntax&#x2F;naming for match and in my humble opinion it should literally just be called &#x27;if&#x27; and any inconsistency that doesnt align with that be removed from the language. Calling &#x27;match&#x27; match is haskell programmers gone wild. Programmers in the real world dont have a clue how to read &#x27;match&#x27;
评论 #13922194 未加载
评论 #13927782 未加载
alvilabout 8 years ago
I can&#x27;t believe you can look at that ugly colorscheme whole day working in even uglier language which rust really is.
astdbabout 8 years ago
Here we Go
评论 #13918657 未加载