ksimka / go-is-not-good Goto Github PK
View Code? Open in Web Editor NEWA curated list of articles complaining that go (golang) isn't good enough
A curated list of articles complaining that go (golang) isn't good enough
Not sure if this repo takes submissions, but here's another article: https://fasterthanli.me/blog/2020/i-want-off-mr-golangs-wild-ride/
Pop quiz. What's wrong with this:
``json:"foo.omitempty"`
The language should have put some structure on tags. Instead of opening a loophole where weird syntax can be added and conventional values are not checked. The compiler or linter should have at least warned that there's a period where a comma should be.
No article, had to go to IRC to ask about it.
Here's the stdlib implementation where only the float version exist. Happy casting
https://golang.org/src/math/abs.go
Solution? Implement the appropriate abs methods yourself
Why? "Go creators work in mysterious ways" - someone told to me on the IRC channel
95% of the articles are from a decade ago, most written after golang was a few years old. Quite a few items have been fixed. Not saying golang is perfect but if there's going to be a repo bashing a language at least keep it updated with relevant articles.
Is it fair game to add summaries of comments on Hacker News?
Probably a bad idea. Idea that may be better: someone write some Big Data Machine Learning Cloud Based Neural Network parser that looks through HN comments and infers the gist of all the negative comments about Go, compiles and scores them, etc.
Write it in Go, of course.
-Go is a poorly designed language
Author: Ian Byrd
func MyFunc(obj interface{}) {
obj = "123"
fmt.Println(obj)
}
func main() {
var s string = "hello"
MyFunc(s)
fmt.Println(s)
MyFunc(&s)
fmt.Println(s)
}
The parameter of interface{}
can be assigned by a normal type or by a pointer. That means:
MyFunc(&s)
but MyFunc(s)
won't cause any error.MyFunc(s)
, but MyFunc(&s)
won't cause any error.This kind of "freedom" is not C-style freedom at all, let me explain:
void swap(int a, int b) // Oops, this function can't swap a and b actually...
{
int tmp = a;
a = b;
b = tmp;
}
A C beginner may code as above, that's because this beginner don't know C very well.
A Go expert may code MyFunc(s)
but what he really needs is MyFunc(&s)
. This expert knows everything about Go, but he still can make such a mistake accidentally only because he is tired, or his girlfriend just called him etc...
Or let's imagine that MyFunc(interface{})
is a third-party library, there is no way to force the user of the library to call the method by MyFunc(&s)
, instead of MyFunc(s)
. But if this is a C library, if you try to call the function swap(a, b)
, you must get an error because this function is defined as swap(int *, int *)
. You don't need to be careful while coding C.
In a word, for C, we say you must learn a lot to avoid some mistakes. But for Go, we say you must be careful to avoid some mistakes.
This kind of "freedom" makes Go like a "stupid bady".
ESR wrote some notes on Go, while converting a large codebase from Python to Go: https://gitlab.com/esr/reposurgeon/blob/master/GoNotes.adoc
You're writing some code. And suddenly you understand you need something that language can't give you. You go here and check if you're the one with that issue or not. If it's a common issue, it'll be here. Then you decide what to do: choose another tool for your task or go find a better solution or a workaround.
What if it's common to do something in Go incorrectly, and that's what people are complaining about? This would be a great venue to teach people the better way, perhaps by adding links or comments just after certain complaints. Will you accept PRs that help clarify such issues? Thanks.
Because go sucks so I would suggest python for example
http://blog.mattbasta.com/things_that_make_me_sad_in_go.html is broken.
Here is a snapshot of this excellent rant from archive.is: https://archive.is/Fh1AF
sorting a uint64 array is not available via the go sort api.
You can sort many other things (int, short, uint32... ) but not uint64
Solution? Create a type that extends []uint64, make it implement sort.Interface, now via transparent casting you can sort uint64 array
Source:
https://stackoverflow.com/questions/38607733/sorting-a-uint64-slice-in-go
Fresh off the printing press:
https://fasterthanli.me/articles/lies-we-tell-ourselves-to-keep-using-golang
Seeing how Go is thriving nowadays and how few new resource this repository is getting, maybe it's time to find a new maintainer or just archive/delete it, thanks.
I volunteer! 😄
But I like Go! :)
Sincerely,
-jeff
Yo, the list is cool, but, maybe let’s consider removing the «for stupid people» parts? I can’t see offending being beneficial to the discourse in any way—especially to converting the Go crowd.
There is a way to communicate the most powerful truths and ideas to people.
Often this requires speaking no ill of the people in question.
— https://twitter.com/devslashdavid/status/775142439996760064
https://www.toptal.com/go/4-go-language-criticisms
I think it is written in 2017 based on the fist comment date...
I think they should be grouped together.
What about Go spawning bunch of kernel threads whenever it makes a blocking system call? I don't see how Golang can solve this.
Hi,
Please add complaints index by age of complaints ordered from early to last recent complaints.
This will allow you to see the progress of language development
Thanks
Does this post belong on the list?
I have learned go for a year.
This is the best project what I seen in go.
Please consider adding the following article "Why I’m So Frustrated With Go" (2017-04-06):
https://hackernoon.com/why-im-so-frustrated-with-go-97c0c4ae214e
Please consider adding the following new essay (2020-09-13) "Golang is not Ready for Enterprise Systems yet and Here’s Why":
CC: @djzort
I think this belongs here: http://valuedrivenit.blogspot.com/2015/12/to-go-language-is-mess.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.